htaccess append Google campaign tracking to aliased url
Sorry for duplicating the thread (htaccess rewrite URL to append Google
campaign tracking causing redirect loop) but the other one requires 50
points to post a comment which I don't have
I have this simple alias in my .htaccess
RewriteCond %{REQUEST_URI} /contact$
RewriteRule .* /content.php?id=17 [L]
and I'm using analytics tracking so need to add a QS like
?utm_source=somesource&utm_medium=email&utm_campaign=somecode
to my alias.
I tried change it in .htaccess to the following but neither of them work:
RewriteCond %{REQUEST_URI} /contact$
RewriteRule .* /content.php?id=17 [L,QSA]
RewriteCond %{REQUEST_URI} /contact$
RewriteRule .* /content.php?id=17&%{QUERY_STRING} [L]
How to catch the query string then?
Thank you
No comments:
Post a Comment