Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5991387
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T23:22:45+00:00 2026-05-22T23:22:45+00:00

I have many sub pages, there urls like www.domain.com/sub/page1.php www.domain.com/sub/page2.php … Now when I

  • 0

I have many sub pages, there urls like www.domain.com/sub/page1.php www.domain.com/sub/page2.php… Now when I type there url in browser. they all redirect to www.domain.com/sub/index.php, and the current sub page will show in a div dom in the index.php.

My knowledge is very limited. I only know jqeury.load and php header Location. but it is difficult redirect to index.php then tell index.php, which is the current sub-pages then do a jqeury.load.

One more note: Also should think SEO. maybe jqeury.load is bad for a search spider. maybe should use hash url.

So I ask for a help. is there anybody could give me some good suggestion? or simple worked examples?

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T23:22:46+00:00Added an answer on May 22, 2026 at 11:22 pm

    In every PHP file (e.g page1.php) use this code:

    <?php
    if(!defined('INCLUDE')) {
        header('Location: index.php?site=' . $_SERVER['PHP_SELF']); //Send the user to the index.php page
        die();
    }
    ?>
    Insert the content you want here...
    

    And in the index.php file:

    <?php
    define('INCLUDE', true);
    if(isset($_GET['site'])) {
        $site = $_GET['site'];
    } else {
        $site = 'page100.php'; //Put the name of the default page if the user visits index.php here
    }
    ?>
    <html>
    <head><!-- HEAD CONTENT HERE --></head>
    <body>
    <div><?php 
    include($site); //Put the page requested into the div
    ?></div>
    </body>
    </html>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In my typo3 website I have a root page and many sub pages which
I have a base class with many sub-classes, and a generic function to cache
I have a website which has so many sub folders in it. I have
We have a sub-project 'commonUtils' that has many generic code-snippets used across the parent
It's common to have many pages in a website that request the same model
I have this wordpress blog that has many pages with subpages that dropdown on
I have many master reports and I would like to unify the page headers
Can someone explain to me how to set up cookieless domain? There are many
I have an action email in my controller of application running on www.example.com and
I have many different NSArray 's stored in .dat files, in the Documents folder

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.