themistral Posted October 17, 2012 Share Posted October 17, 2012 Hi guys, I'm working on an old version of osCommerce with a mod that rewrites URLs to SEO friendly ones. This is not a site I have built and as such am unfamiliar with the mod. .htaccess is setup with the following rewrite rule: RewriteRule ^(.*).html$ root.php?$1.html&%{QUERY_STRING} This works absolutely fine, except for the fact that when we use this from Adwords, we lose the gclid which means that conversion data is being lost. Is there a way to check for the gclid parameter and parse that as a query string? I was thinking something like RewriteCond %{QUERY_STRING} (^|&)gclid($|&) RewriteRule ^(.*).html?{QUERY_STRING}$ root.php?$1.html&%{QUERY_STRING} [QSA] I've tried this but it's not working. Utlimately want I want to achieve is page_uri.html?gclid=status Is this even possible, and if so, can someone point me in the right direction? Thanks Link to comment https://forums.phpfreaks.com/topic/269571-rewrite-url-but-keep-one-querystring-parameter/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.