开发者

Removing a folder name from a url using mod rewrite

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜