Jump to content

Redirecting From A Content Page to Index


jaic

Recommended Posts

Hi All

 

I have this site that uses inline frames for every content page that follows from the index.htm page

 

I have a robots.txt file in place to stop all user-agents from crawling my site as if someone was to directly access a page other than the index.htm page, such as www.mydomain.com/page2.htm then they would only see the content on this page and not everything that goes around it (i.e. the main page with all the buttons, banner, adverts etc, etc.

 

I know that using i-frames is not the best thing, but when the site involves a lot of updating on a day-to-day, week-to-week basis it is so much easier to have these inner pages to edit rather than editing and re-formating everything else.

 

So, my question is...

 

Is there a some code that can be added to each page so that if a user was to directly access my site to that specific page (/page2.htm) that they would end up on index.htm from outside of the site, such as from a link from another site or through google for example, if i was to open the web up fully to all user-agents by removing the robots.txt file?

 

Peraps a script in the <head> section of each page would do it??

I have no idea where to start and it would be a great help if someone could show me the way!

 

Thanks for your help in advance!

 

 

Ja

Link to comment
https://forums.phpfreaks.com/topic/76981-redirecting-from-a-content-page-to-index/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.