Reputation: 59
I am trying to one URL with parameter to another url which doesn't have parameter. I have written below things in apache conf file:
RewriteEngine On
RewriteCond %{REQUEST_URI} ^/abc/others_jp$
RewriteCond %{QUERY_STRING} ^utm_source=facebook_jp&utm_medium=social&utm_campaign=2014_Facebook_contents&utm_term=other_facebook&utm_content=bridal$
RewriteRule ^(.*)$ http://www.others.com/campaign/link-to-love-2015 [R=302,L]
When i tried, it shows like
Here I don't want to include the query string in redirected URL.
Upvotes: 0
Views: 26
Reputation: 22841
Just add a ?
to the rewrite, that will truncate the query string:
RewriteRule ^(.*)$ http://www.others.com/campaign/link-to-love-2015? [R=302,L]
Upvotes: 0