Reputation: 65
I'd like to rewrite:
http://www.example.com/item.html/category/something/something2
To :
http://www.example.com/item/something/something2
Thus getting rid of "category" and ".html"
I have tried:
#rewrite to remove "category" and ".html"
RewriteEngine On
RewriteCond %{REQUEST_URI} !^item.html/category/
RewriteRule ^item/(.*)$ /item/category/$1 [QSA,L]
Upvotes: 0
Views: 62
Reputation: 1477
Do you need the RewriteCond, just do the rewrite like so:
RewriteEngine On
RewriteRule ^item.html/category/(.*)$ /item/$1 [QSA,L]
Upvotes: 1