鉴于此网址http:// sub .domain.org / sub / other_string我需要将其重写为:http://newdomain/sub/ ... < / p>
我正在尝试重写,但我想我想念RewriteCond。 在第二个Cond中,我可以使用第一个Cond的捕获吗?
RewriteCond %{HTTP_HOST} ^(.*)\.domain\.org$
RewriteCond %{REQUEST_URI} ^/%1/.*$ [NC]
RewriteRule (.*) /%1/$1 [nosubreq,QSA,L]