我将如何对我的子域的所有子目录使用 RewriteCond
示例:test.example.com/folder1/page1.php
-> code.example/folder1/page1.php
(在地址栏中显示 test.example.com/folder1/page1.php)
我目前正在使用:
RewriteCond %{HTTP_HOST} ^(.+)\.example\.com RewriteRule ^(.*)$ http://code.example.com/$1 [CO=cookie:%1:.example.com:126144000:/,P]
这就是我想要的test.example.com/page2.php
-> code.example.com/page2.php
(在地址栏中显示 test.example.com/page2.php)
但是当我这样做时test.example.com/folder1/page1.php
->code.example.com/folder1/page1.php
我看到 code.example.com/folder1/page1.php (我不想要)