[NCLUG] is mod_rewrite what i want

Michael Dwyer mdwyer at sixthdimension.com
Mon Feb 25 09:59:12 MST 2002


mbutcher wrote:
> 
> You should be able to use redirect, which (I believe) sends a HTTP 304 to the
> browser, and the browser will redirect itself.

This is done with the Apache Redirect directive.  This is somewhat
dangerous, though.  It seems to hit on a substring search.  So in the
example mbutcher gave you, it might actually loop.  This would be a Bad
Thing(tm).  As usual, though, try it out.  It may work just fine for
you!

> This means you shouldn't have to do any fooling around with changing the
> server config, etc.

For myself, I use a meta refresh to do it.  Once they load the first
page, they are redirected off to the real address.  This is often
annoying to people who bookmark the page, and is certainly annoying to
anyone who tries to use the BACK button to get passed this redirect... 
but it works. <shrug>

<HTML>
 <HEAD>
  <TITLE>Redirecting...</TITLE>
  <META HTTP-EQUIV="refresh"
CONTENT="1;URL=http://www.foo.bar/scripts/foo.cgi">
 </HEAD>
 <BODY>
<A HREF="http://www.foo.bar/scripts/foo.cgi">Redirecting...</a><BR>
</BODY>
</HTML>



More information about the NCLUG mailing list