trq Posted May 6, 2010 Share Posted May 6, 2010 I have what I would consider a pretty simple redirect. We have a series of promotion codes which all need to be redirected to our store. These work however we also have some affiliates who link banners to these urls along with a querystring parameter so we can (within the store) recognise where the link came from. The rule I have: RewriteRule ^(?:abc|brt|dbcc|ppc|dqu|arl)\??(.*)$ https://www.ourstore.com/Store/Jadehttp.dll?Store&$1 [R] /abc etc etc all work fine and redirect as expected. However, appending a querystring such as /abc?foo=bar does not get passed along. Remember these are optional and may not always be present. Any help would be greatly appreciated. ps: This is actually being performed using isapi rewrite on IIS but it should be compatible with mod_rewrite. Quote Link to comment https://forums.phpfreaks.com/topic/200859-redirect-with-optional-query-string-param/ Share on other sites More sharing options...
cags Posted May 6, 2010 Share Posted May 6, 2010 Sounds like the solution with mod_rewrite would be to set the QSA flag. Couldn't say if isapi rewrite supports it though. Quote Link to comment https://forums.phpfreaks.com/topic/200859-redirect-with-optional-query-string-param/#findComment-1054029 Share on other sites More sharing options...
trq Posted May 6, 2010 Author Share Posted May 6, 2010 Damn, forgot all about QSA, and yes, it is supported. Thanks! Quote Link to comment https://forums.phpfreaks.com/topic/200859-redirect-with-optional-query-string-param/#findComment-1054355 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.