Alessio Puccini
Alessio Puccini

Reputation: 77

How to redirect an url htacces mod_rewrite?

I have an url to redirect with htaccess and mod_rewrite.

I try with this code but don't work

RewriteCond   %{REQUEST_URI}    ^/tag/citta/$
RewriteCond   %{QUERY_STRING}   ^lang=en$
RewriteCond   %{REQUEST_URI}    ^/feed/$
RewriteRule   .*   /en/offers-events/? [R=301,L]

How can I redirect the url?

Thanks for the help.

Upvotes: 1

Views: 38

Answers (1)

anubhava
anubhava

Reputation: 786271

You may use this rule:

RewriteCond %{QUERY_STRING} ^lang=en/feed/$ [NC]
RewriteRule ^tag/citta/?$ /en/offers-events/? [NC,R=301,L]

Upvotes: 1

Related Questions