[thelist] Redirecting a page based on its address

Michael Galvin mpgalvin at eircom.net
Sun Sep 24 13:07:41 CDT 2000


I have this fairly major site now with over 130 articles in it.  I don't
want to spend any money on a CMS, so I was thinking of writing a little
.html file which would set up the look at navigation of each article, and
then show the article, which would be in another .html file, and is passed
as a parameter.  For example,

http://www.mydomain.com/view.html?1.html

which would show 1.html WITHIN the view.html file.

Technically, I'm not so sure this will work perfectly, but I'm willing to
give it a go.  However, my problem is that I have a search engine on the
site, and that will find 1.html if the search matches.

So, I need to find some way that if the user gets pointed directly to
1.html, that it would redirect itself to ...view.html?1.html.  This would
have to be a fairly generic function.  I had a way working, but I found that
it was continually redirecting, so I was getting

view.html?view.html?view.html...etc..?1.html

which was obviously no good.

Has anyone done anything like this and had success?
TIA
Michael Galvin





More information about the thelist mailing list