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>
精彩评论