我们有这样的链接,用户可以在电子邮件中点击这些链接。
https://www.samplesite.com/re/Jim.Smith
发生的事情是他们被重定向到绝对 url 而不是上面的个性化 url。
因此,在单击电子邮件中的链接后的 url 中,它看起来像这样。
https://www.samplesite.com/sample_folder/landing.aspx?rid=Jim.Smith
我们希望保持 url 链接与电子邮件中的链接相同。以下是我们的螺旋规则。你能告诉我如果这有什么问题吗?
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]