My code is
Options -Multiviews
RewriteEngine On
RewriteBase /
RewriteRule ^([a-z0-9-]+)\.html$ /index.php?cat=$1 [L]
If I access
mysite.com/name-of-category.html
it works, but if I access
mysite.com/name-of-category.html?anything=something
it shows the webpage but $_GET["anything"] shows nothing.
You must specify an option called QSA or 'Query String Append':
RewriteRule ^([a-z0-9-]+)\.html$ /index.php?cat=$1 [L,QSA]
It will ensure that the original query strings are also included as part of your new URL.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With