开发者

Removing a folder name from a url using mod rewrite

开发者 https://www.devze.com 2023-01-15 02:33 出处:网络
I have a url stru开发者_开发技巧cture that looks like this: http://www.blahblah.com/community/i/pagename

I have a url stru开发者_开发技巧cture that looks like this:

http://www.blahblah.com/community/i/pagename

However, I want to remove the ugly /i/ part. Is this possible with Modrewrite?


Yes, it's possible:

<IfModule mod_rewrite.c>
RewriteEngine on

RewriteRule ^(\w+)/(\w+)$ $1/i/$2 [QSA]
</IfModule>
0

精彩评论

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

关注公众号