本地主機和遠程主機如何將根重定向到子目錄?htaccess如何將兩個主機重定向到子目錄
本地主機:domain.localhost
遠程主機:domain.com
子目錄:子目錄
domain.localhost -> domain.localhost/subdir/<br>
domain.localhost/ -> domain.localhost/subdir/<br>
domain.com-> domain.com/subdir/<br>
www.domain.com -> www.domain.com/subdir/<br>
Options +FollowSymLinks
DirectoryIndex questions.php
RewriteEngine on
RewriteCond %{HTTP_HOST} ^domain\.localhost$
RewriteRule ^(.*)$ http://domain\.localhost/subdir/$1 [R=301,L]
RewriteCond %{REQUEST_URI} ^/$
RewriteRule (.*) http://www.domain.com/subdir/ [R=301,L]
我已經嘗試了所有的解決方案,但不幸的是沒有按預期工作。謝謝你們所有的答案。 – Codex73 2012-03-22 17:49:06