[thelist] Redirect urls

Mark Groen evolt at markgroen.com
Sun Jul 23 13:07:31 CDT 2006


On Sun, 2006-07-23 at 10:34 -0700, Mark Groen wrote:

> Lots more examples for just about any situation at:
> http://httpd.apache.org/docs/2.0/misc/rewriteguide.html
> geeky stuff but a necessary tool with Apache software.

Just found this rather nice cheat sheet, the examples are better and
there's other good info:
http://www.ilovejackdaniels.com/apache/mod_rewrite-cheat-sheet/

Also, I missed that this was supposed to be a permanent redirect? That's
what those characters in the square brackets are for, R=301 means
permanent redirect and if it's the last rule in a list you can get a wee
bit of optimization by telling it so it doesn't keep looking for more
rules with the "L" as below:

RewriteEngine on
RewriteRule   ^gallery(.+)  http://isitbeertimeyet.ca/index.php  [L,R=301]

-- 
cheers,

        Mark




More information about the thelist mailing list