Discussion Locked

Apache HTTP URL Redirect

0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
I have a website that uses frames. So it is important when a visitor arrives at the site that they enter via the home page which sets up the frames and some important cookies/environment variables. The problem I have is that some search engines haveindexed web pages for the site other than the home page. So, I have visitors entering the site on a page that should be wrapped in the frames context but is not becoause they bypassed the home page (index.html). I would like to redirect any requestsfor these pages that do not originate from home page (referring URL) back to the home page. I know I can write a perl script to do a redirect based on referring URL. However, I suspect there is a way to handle this in the Apache server config file. Can anyone point me to the right area? Should I be using mod_rewrite or is there a simpler solution?

3 replies

by nikki96

The solution is not to use frames for such important things. This is one of the biggest problems with them. That and users being unable to bookmark anything.

Anyone who doesn't want to use your frames (and many of us hate frames) can easily bypass anything you do with referring URL simply by typing the destination in the browser addy bar after loading your frames page (yes, that works, I do it all the time).
If I just want the data on one page, I'll go to Google's cache and get it.

Thereis a way to ensure your page is framed by using javascript(client-side), but those of us who hate frames will merely disable javascript.

If you want to be sure your data is set up, do it on every page. This is easily done w/o frames if you have server-side includes or other server-side scripting languages that can all include the same file (like Perl).

Even using javascript (which is a bad thing to rely on) you can simply include the same file on every page with .

And if you don't want search engines to index a page, nice ones (like Google) will obey the meta tag that tells them not to index it.

HTH

This discussion is closed to new replies.