2012-08-24 53 views

回答

0

您無法與具有%{HTTP_HOST} var的URI路徑進行匹配,只有主機。你要麼需要包括~mpnl部分作爲重寫鹼或請求的一部分URI:

RewriteEngine on 

# remove the "/~mpnl" from the end of this line, add a [NC] 
RewriteCond %{HTTP_HOST} ^(www.)?cobweb.seas.gwu.edu$ [NC] 
# add a "/~mpnl" to here 
RewriteCond %{REQUEST_URI} !^/~mpnl/joomla/ 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
# remove the leading slash before "joomla" 
RewriteRule ^(.*)$ joomla/$1 [L] 

# add a condition to this: 
RewriteCond %{REQUEST_URI} !^/~mpnl/joomla/ 
RewriteRule ^(/)?$ joomla/index.php [L] 
+0

我嘗試了你的建議(.htaccess)文件沒有成功 - 仍然得到相同的500內部服務器錯誤。我仔細檢查並在服務器上啓用了mod_rewrite。我使用textedit編輯文件,確保文件保存爲unix和ansi編碼。還嘗試了各種權限。我應該提到我將(.htaccess)文件保存到public_html的根目錄。 –

相關問題