Topic: Ignore parameters entered into a URL
|

|
| Author |
|
goldmail Newbie

Joined: 19 August 2009
Online Status: Offline Posts: 22
|
| Posted: 14 May 2010 at 6:45pm | IP Logged
|
|
|
We are running Windows 2003 with IIS6 and ISAPI Rewrite 2.0. This is what is currently in the httpd.ini file
RewriteRule .*/([a-z,0-9]){12,12}/$ /default.aspx?gmid=$1 [I,L] RewriteRule .*/([a-z,0-9]{12,12})$ /default.aspx?gmid=$1 [I,L]
What this does is look for a 12 character string after the '/' in the domain name. If it URL matches, it will play what we call a GoldMail. If it doesn't you get a custom 404 page that says "Sorry your GoldMail was not entered correctly".
We've now run into the issue where the customer will add parameters to the GoldMail for whatever reason. What happens is that with the added parameters the string is no longer 12 characters and they get the custom 404 page.
Here is an example:
This works fine: http://play.goldmail.com/6odg5x9vz4ep
This doesn't work: http://play.goldmail.com/6odg5x9vz4ep?utm_source=Test&utm_medium=Test&utm_campaign=Test
How can I rewrite it to ignore any parameters added to the URL? For instance tell it to ignore the ? and everything after it?. If that isn't possible, do you have another solution on how we can accomplish this?
|
| Back to Top |
|
| |
Anton Admin Group

Joined: 30 January 2007 Location: Ukraine
Online Status: Offline Posts: 10489
|
| Posted: 17 May 2010 at 3:13am | IP Logged
|
|
|
Please try using the following config instead of the one above:
RewriteRule /([a-z,0-9]{12})(?:\?.*)?$ /default.aspx\?gmid=$1 [I,L]
__________________ Regards,
Anton
|
| Back to Top |
|
| |
|
|
If you wish to post a reply to this topic you must first login
If you are not already registered you must first register
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum
|