这是我的 htaccess 文件中设置的 Drupal 的当前重写规则:
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !=/favicon.ico
RewriteCond %{REQUEST_URI} !=/index.html
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
这很好用,但问题是我想要一个自定义页面,当人们浏览网站时会打开它。更详细:
www.company.com/ 应该打开 index.html 所有其他页面应该使用 Drupal 的默认重写规则。
我尝试编辑 DirectoryIndex,但随后所有页面都被重定向到 index.html。
DirectoryIndex index.html index.php
我也尝试添加不同的重写规则,但我还没有运气。Htaccess 不是我最好的技能。
RewriteCond %{REQUEST_URI} ^/$ [NC]
RewriteRule ^/$ /index.html [L]
可能会有一个简单的解决方案,但我不知道该怎么做。
有谁知道如何解决我的问题?
谢谢!