We have links like this that users click on in emails.
https://www.samplesite.com/re/Jim.Smith
What is happening is they are getting redirected to the absolute url instead of the personalized url above.
So in the url after clicking on the link in the email it looks like this.
https://www.samplesite.com/sample_folder/landing.aspx?rid=Jim.Smith
We wish to keep the url link the same as the link in the email. The following is our helicon rule. Can you tell me what if anything is wrong with this?
RewriteCond %{HTTPS} on
RewriteCond %{HTTP_Host} (^(?:www\.)?www.samplesite.com$) [NC]
RewriteCond %{REQUEST_URI} !^/(robots\.txt|favicon\.ico)$ [NC]
RewriteRule ^/re/([^/]+)$ https://www.samplesite.com/sample_folder/landing.aspx?rid=$1 [NC,L,R]
You need a rewrite, instead of a redirect. Change this:
to this:
The
Ris telling it to redirect, which is what you're experiencing. Removing theRwill just do a rewrite.(I like to include
Uwhich means to unmangle the url for the IIS logs, so the logs show the original url. This is up to you.)As a side note, since your rule is checking for /re/... you don't need the line with the robots.txt and favicon.ico