Reputation: 47
I need to remove the url's feed by using htaccess.
I use RewriteRule ^[0-9]{4}/[0-9]{1,2}/[^/]+/feed/?$ /[R,L]
But it can't direct the url
to right url
I don't know too much about htaccess.
If you can tell me how or give me some advice to learn how to do it, it's really thank you for your help.
Just redirect the url:example.com/xxx/feed to example.com/xxx/ in htaccess.
Upvotes: 1
Views: 3112
Reputation: 785186
Simplify your rule to this:
RewriteEngine On
RewriteRule ^(.+?)/feed/?$ /$1/ [L,R]
OR using RedirectMatch
:
RedirectMatch 302 ^/(.+?)/feed/?$ /$1/
Upvotes: 1