[thelist] Redirecting a page based on its address

Warden, Matt mwarden at odyssey-design.com
Sun Sep 24 13:24:18 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.

Hmmm... that gets kinda nasty. If you're gonna take it that far, why not
take it a step further? To me, there is a lot to gain when you have a set up
like this. If you change something in the surrounding html file, the entire
site changes. Hmmmm... why not make the second file XML? Then you just
change the view.html file and the XSLT stylesheet and your entire site has
changed. Not to mention the thousands of other benefits of XML. Since you're
gonna have so many pages, you might want a site/article search. Searching
for <article-title>yo</article-title> is a bit better than searching for
<h1>yo</h1>.

> 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.

Hmmmm... search engine, eh?

> 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.

hmmmm... can't you edit the search engine to write out:

...href="view.html?<%=FoundURL%>"

???


--
mattwarden
mattwarden.com





More information about the thelist mailing list