2012-10-16 29 views
1

其實我有一個單獨的域(example.com)這是託管在godaddy託管帳戶,最近我買了另一個域(example2.com)這兩個域我託管在同一個託管帳戶。htaccess在多個域的衝突

現在讓我告訴你兩個域的路徑:

example.com in on the/folder
example2.com in on the /example2 folder

我已經建立3子域與我example.com域和託管帳戶創建的文件夾相同/目錄下的子域。

可以說demo.example.com和文件夾是/demo

現在來看看第二個域,最近我已經創建了一個子域我example2.com

test.example2.com位於根與文件夾/test不喜歡/example2/test因爲我的第二個領域是在/example2文件夾

現在的問題是,當我能爲我的test.example2.com .htaccess文件,我得到了

500 Internal Server Error

AddDefaultCharset UTF-8 

ErrorDocument 404 /404error.php 

Options +FollowSymlinks -MultiViews 
RewriteEngine on 

RewriteBase/

RewriteCond %{REQUEST_URI} !(\.[a-zA-Z0-9]{1,5}|/)$ 
RewriteRule (.*)([^/])$ http://%{HTTP_HOST}/$1$2/ [R=301,L] 


RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /.*index\.php\ HTTP/ 

RewriteCond %{HTTP_HOST} !^www\. 
RewriteCond %{HTTP_HOST} !^localhost 
RewriteRule .* http://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L] 

RewriteRule ^(all)/([^/]+)/?$ story.php?title=$2 [L] 
RewriteRule ^(all)/?$ index.php [R=301,L] 

這裏的.htaccess文件,但沒有htaccess的它的正常工作,我想我與RewriteBase

問題有點一部分,我也試圖與像RewriteBase /test/

RewriteBase /example2/test/

但沒有幫助,c有人告訴我問題在哪裏,我該如何調試這個問題?

但這個我的其他子域的其餘工作正常。

UPDATE錯誤日誌

[Tue Oct 16 21:47:04 2012] [alert] [client 110.172.129.110] /var/chroot/home/content/06/8871106/html/bestsocialbookmark/.htaccess: Option All not allowed here 
[Tue Oct 16 21:47:07 2012] [alert] [client 110.172.129.110] /var/chroot/home/content/06/8871106/html/bestsocialbookmark/.htaccess: Option All not allowed here 

是真的,我不知道那是什麼意思。

+0

你打算導致500錯誤的URL是什麼? (例如。'http://test.example2.com/...') –

+0

@JonLin url是'http:// test/example2.com'我得到了500錯誤。 –

+0

'http:// test/example2.com'?我不明白。你的意思是'http:// test.example2.com /'? –

回答

1

/var/chroot/home/content/06/8871106/html/bestsocialbookmark/.htaccess:選項所有不在這裏

允許這可能是什麼引起的錯誤。而不是你的規則(這看起來很好,他們在我的空白htaccess文件中工作正常)。

因此,在/var/chroot/home/content/06/8871106/html/bestsocialbookmark/目錄中的htaccess文件中,您有一個Option All的地方。你可能的意思是Options All,因爲Option不是核心指令(它可以在另一個第三方模塊中使用,但顯然不允許)。只要刪除它。

+0

這裏是完整的.htaccess文件http://scrp.at/bQz,你能幫我找出,因爲我得到了'選項全部',我試過沒有它,但沒有幫助.. –

+0

@jogesh_p Line 220 ,'選項全部' –

+0

:(抱歉,但沒有幫助。 –