我配置了.htaccess文件,如下所示:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^(www\.)?domain.com$ [NC]
RewriteCond %{REQUEST_FILENAME} !/pathtopublichtml/joomla/
RewriteRule ^(.*)$ /pathtopublichtml/joomla/$1 [L]
但是当我试图前往/domain.com/moodle
时,Apache将我带到了Joomla。我怎样才能访问这两个?
答案 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]