themistral Posted October 17, 2012 Share Posted October 17, 2012 (edited) 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 Edited October 17, 2012 by themistral Quote 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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.