开发者

How to remove url query string in htaccess

开发者 https://www.devze.com 2023-03-01 07:54 出处:网络
I have this url: http://www.example.com/?option=com_php&Itemid=1&ep=3&lang=us I want to this url:

I have this url: http://www.example.com/?option=com_php&Itemid=1&ep=3&lang=us

I want to this url: http://www.example.com/?ep=3&lang=us

How to remove this line option=com_php&Itemid=1& in htaccess?

I have read many responses on this subject and I searched the web, but unfortunately no solution works. Please he开发者_如何学JAVAlp me :)


Put these lines in your .htaccess file:

Options +FollowSymlinks -MultiViews
RewriteEngine on

RewriteCond %{QUERY_STRING} ^option=([^&]+)&Itemid=([^&]+)&(ep=[^&]+)&(lang=[^&]+)$ [NC]
RewriteRule . %{REQUEST_URI}?%3&%4 [L,R]
0

精彩评论

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