2016-11-22 49 views
0

我想重定向如果REQUEST_URI包含/register/affiliate/32簡單的重定向的URL

RewriteCond %{REQUEST_URI} /register/affiliate/32 
RewriteRule (.*) https://affiliate.example.com [R=301,L] 

它工作正常,但它也包括在重定向URL的REQUEST_URI請問有什麼可以阻止它追加REQUEST_URI,該URI未包含在重定向的網址中?

回答

0

嘗試像這樣,

RewriteCond %{REQUEST_URI} ^/register/affiliate/32 
RewriteRule ^(.*)$ https://affiliate.example.com [R=301,L]