I have URLs that are generated as http://www.domainname.com/about?layout=item I would like to find out how to remove the ?layout=item and also ?layout=category
Any help would be much appreciated
I have URLs that are generated as http://www.domainname.com/about?layout=item I would like to find out how to remove the ?layout=item and also ?layout=category
Any help would be much appreciated
Following assumes that there is either layout=item or layout=category (not both at the same time)
RewriteCond %{QUERY_STRING} !^$
RewriteCond %{QUERY_STRING} ^(.*)(?<=&|^)layout=(item|category)&?(.*)$.
RewriteRule .* $1?%1%3