2012-08-24 58 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的根目录。 –

相关问题