开发者

How to remove ?layout=item from urls

开发者 https://www.devze.com 2022-12-27 19:11 出处:网络
I have URLs that are generated as http://www.domainname.com/about?layout=item I would like to find out how to remove the ?layo开发者_如何学Cut=item and also ?layout=category

I have URLs that are generated as http://www.domainname.com/about?layout=item I would like to find out how to remove the ?layo开发者_如何学Cut=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
0

精彩评论

暂无评论...
验证码 换一张
取 消