如何为子域的所有子目录使用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(我做不想要)