基本上我有一個共享服務器與一個現有的網站和一個新的網站。在大多數共享主機(Linux)的我有,文件結構是這樣的:共享服務器上的兩個網站的htaccess配置
- public_html
-- firstsite.com
-- secondsite.com
對於問題的服務器結構更像是這樣的:
- public_html
-- all of the folders and files of the first site loose in this directory
-- secondsite.com
所以,如果我嘗試從瀏覽器訪問secondsite.com,我在這裏發送代替: http://firstsite.com/secondsite.com
......這顯然是不正確的。我的託管支持告訴我,如果我重新命名由firstsite.com使用的htaccess文件的secondsite.com會解決: http://secondsite.com
我明明只是不能禁用我的htaccess的文件,因爲這將博克的第一個站點。
所以我期待在我的htaccess的文件,並認爲這是有問題的行:
### Only allow access without the www. ####
RewriteCond %{HTTP_HOST} !^firstsite\.come$ [NC]
RewriteRule ^(.*)$ http://firstsite.com/$1 [R=301,L]
我想我需要一組類似的,涉及到secondsite.com
規則?
任何建議將是偉大的。