jesse1981
5/7/2013 - 11:32 PM

Typical htaccess rewrite implementation

Typical htaccess rewrite implementation

RewriteEngine On

RewriteRule ^js - [L,NC]
RewriteRule ^img - [L,NC]
RewriteRule ^css - [L,NC]

RewriteRule ^([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)/(.*)$ index.php?module=$1&action=$2&id=$3&format=$4 [QSA,L]
RewriteRule ^([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)/(.*)$ index.php?module=$1&action=$2&id=$3 [QSA,L]
RewriteRule ^([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)/(.*)$ index.php?module=$1&action=$2 [QSA,L]
RewriteRule ^(.*)$ index.php?module=$1 [QSA,L]