Return to Snippet

Revision: 7976
at August 25, 2008 13:37 by antpaw

Initial Code
RewriteEngine on

RewriteRule ^admin/?$ admin.php [NC]
RewriteRule ^admin/([^/.]+)/?$ admin.php?action=$1 [NC]

RewriteRule ^([^/.]+)/?$ index.php?a=$1 [L]
RewriteRule ^([^/.]+)/([^/.]+)/?$ index.php?a=$1&b=$2 [L]
RewriteRule ^([^/.]+)/([^/.]+)/([^/.]+)/?$ index.php?a=$1&b=$2&c=$3 [L]

Initial URL

Initial Description
write this in your .htaccess

links are going to look like this

[NC] will remove the case sensitivity of your static words like "admin"

its going to work, even if you type

Initial Title
Modrewrite for PHP variables

Initial Tags
php, xhtml, htaccess

Initial Language