我有一个Drupal网站和一个MVC网站。我想将MVC网站作为Web应用程序托管在IIS中的Drupal网站中。总体上,我的IIS配置如下所示:
主要测试的URL为https://mysite.orgg/,我希望MVC应用程序的URL为https://mysite.orgg/mymvc/home/login。当我这样设置IIS并尝试浏览MVC应用程序的URL时,我从Drupal站点看到“找不到页面”错误。有什么办法可以解决这个问题?
答案 0 :(得分:0)
我会说您必须调整drupal的.htaccess
(位于web
目录中)文件,该文件可捕获请求并将其转发到index.php。
您将必须添加以下附加条件:
RewriteRule ^(mymvc) - [L]
...这将排除您的mvc路径。我最好的猜测是在这里添加它:
# Pass all requests not referring directly to files in the filesystem to
# index.php.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !=/favicon.ico
RewriteRule ^ index.php [L]
没有尝试过,但这是基本思想。