Thought Patterns

Cameron’s thoughts on everything and nothing.

Great guide to using Apache’s mod_rewrite

| 0 comments

Stumbled on these great guides for using Apache’s mod_rewrite:

http://www.easymodrewrite.com/guide-syntax

http://www.easymodrewrite.com/guide-advanced

One particular area of interest was the following rules:


RewriteCond %{SCRIPT_FILENAME} !-f
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteRule  (.*) index.php?page=$1 [QSA,L]

The above rules will pass all URI requests through index.php for handling unless the requested file or directory exists.

Bookmark and Share

Leave a Reply

Required fields are marked *.

*