Apache配置为将URL链接到Joomla但是我怎样才能访问Moodle?

时间:2017-04-25 02:43:01

标签: apache .htaccess joomla moodle

我配置了.htaccess文件,如下所示:

正在使用Mod_rewrite。

RewriteEngine On  
RewriteCond %{HTTP_HOST} ^(www\.)?domain.com$ [NC]  
RewriteCond %{REQUEST_FILENAME} !/pathtopublichtml/joomla/  
RewriteRule ^(.*)$ /pathtopublichtml/joomla/$1 [L]  

但是当我试图前往/domain.com/moodle时,Apache将我带到了Joomla。我怎样才能访问这两个?

1 个答案:

答案 0 :(得分:0)

您可以添加其他RewriteCond以排除任何以“moodle”开头的REQUEST_URI

RewriteEngine On  
RewriteCond %{HTTP_HOST} ^(www\.)?domain.com$ [NC]  
RewriteCond %{REQUEST_FILENAME} !/pathtopublichtml/joomla/
# Make sure the redirect is not done for moodle
RewriteCond %{REQUEST_URI} !^moodle
RewriteRule ^(.*)$ /pathtopublichtml/joomla/$1 [L]