I'm trying to implement a functionality using that will allow:
1) Shortening a URL with query parameters (ie.
http://example.com/page?utm_campaign=name),
and
2) The supr shortened URL will be considered the same as the URL
without campaign parameters
(ie.
http://example.com/page),
3) So that the supr dashboard doesn't have redundancies.
4) If possible, it would be nice to have the final landing page be
stripped of query parameters but still pass the Google Analytics
tracking data.
I think the redirect would look something like:
http://su.pr/hash =301=>
http://example.com/page?utm_campaign=name
=301=>
http://example.com/page
I see a couple of potential ways to accomplish this including using
modifying supr's mod_rewrite to strip paramenters, but I'm not sure
this would have the desired effect.
RewriteCond %{QUERY_STRING} example=
RewriteRule (.*)
http://www.domain.com/$1? [R=301]
Any thoughts?