Archived; click post to view.
Excerpt: This handy set of rules for mod_rewrite automatically redirects any URL ending in "/index.php" to the same URL ending in "/."  It works for the root directory as well as subdirectories.RewriteCond %{THE_REQUEST} ^GET\ /.*/index\.(php|html)\ HTTPRewriteRule (.*)index\.(php|html)$ /$1 [R=301,L]For example, "http://www.example.com/subdirectory/index.php" would be redirected to "http://www.example.com/subdirectory/." This eliminates one of the peskier can…

Tell an amigo:
  • Digg
  • del.icio.us
  • Reddit
  • Facebook
  • Furl
  • Technorati
  • Yahoo! Buzz
  • Slashdot
  • StumbleUpon
  • TwitThis

4 Comments »

Archived; click post to view.
Excerpt: I've seen many misconceptions about mod_rewrite.  I believe this is because most people in this industry know what it is, but aren't programmers, or don't understand the concepts well. First, I've seen people say mod_rewrite incurs major overhead. This may be true if you ask apes to write your regular expressions, and all of your expressions are PT (pass through) and execute every other expression in the list, so I don't know where that came from.Then there are the …

Tell an amigo:
  • Digg
  • del.icio.us
  • Reddit
  • Facebook
  • Furl
  • Technorati
  • Yahoo! Buzz
  • Slashdot
  • StumbleUpon
  • TwitThis

1 Comment »