.htaccess mod_rewrite url with multiple optional parameters
snippet in htaccess

.htaccess mod_rewrite url with multiple optional parameters

user6155

RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI}  ^/([^/]+)/?([^/]*)?/?([^/]*)?/?([^/]*)?/?   [NC]
RewriteRule .*    index.php?key1=%1&key2=%2&key3=%3&key4=%4  [L]