0
我已搜查谷歌爲這件事,但沒有發現 我想重定向任何子域新頁,其中位於新目錄子域htaccess的重定向
例如: 如果人們寫http://subdomain.example.com它會自動重定向到http://subdomain.example.com/newdirectory/new-index.php
我已搜查谷歌爲這件事,但沒有發現 我想重定向任何子域新頁,其中位於新目錄子域htaccess的重定向
例如: 如果人們寫http://subdomain.example.com它會自動重定向到http://subdomain.example.com/newdirectory/new-index.php
你可能想要做一個URL重寫重定向
RewriteEngine on
RewriteRule ^(.*)$/newdirectory/$1 [R]
在我的例子我認爲新的index.php實際上是調用索引.php,以便它更容易,對我更有意義。
看一看:
http://httpd.apache.org/docs/2.0/misc/rewriteguide.html