Reputation: 681
I want to redirect all requests to http://www.example.com/category/* to http://www.example.com.
This is what I tried:
RewriteRule http://www.example.com/category/.* http://www.example.com [R=301,L]
Unfortunately, this does not work. Any ideas how to write the rule correctly?
Thanks!
Upvotes: 2
Views: 47
Reputation: 18671
You can use:
RewriteEngine on
RewriteRule ^category/ /? [NC,R=301,L]
Upvotes: 3
Reputation: 33
Please try below thing.
RewriteEngine on
RewriteRule "http://www.example.com/category/.*" "http://www.example.com" [PT]
Upvotes: 0