I am cleaning a large .htaccess file containing many mod_rewrite statements.
Most of the confusion comes from claims spanning various occurrences.
/directory1 /directory1/directory2 /directory1/directory2/directory3
using expressions like
RewriteCond %{REQUEST_URI} ^/([^/]+)/([^/]+)$ RewriteRule .* /front.php?level1=%1&level2=%2&%{QUERY_STRING} [L] RewriteCond %{REQUEST_URI} ^/([^/]+)/([^/]+)/([^/]+)$ RewriteRule .* /front.php?level1=%1&level2=%2&level3=%3&%{QUERY_STRING} [L]
could anyone get to know mod_rewrite give me a pointer to how to write one universal statement that will catch any depth of directory1/directory2... and put the corresponding level variable in a RewriteRule?
source share