Is there is a way to get query string back in PHP?
I have:
http://mywebsite.com/cars/BMW/ http://mywebsite.com/List.php?categories=/cars/BMW/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^/]*)/$ /List.php?categories=$1 [L]
I want to capture categories value in PHP .Please note the parameter format ‘/cars/BMW/’
You can try the following:
This will capture whatever comes after categories in the query-string and apply it in the rule.