2
问题是我需要重定向到projects.test.net/rr/index.php,如果我来到站点的根目录,它是http://projects.test.net/rr/.htaccess从站点根目录重定向到index.php
为什么第一个重写规则不起作用?我也试过添加
RewriteCond %{HTTP_HOST}^projects.pepperit.net/rr/ [NC]
RewriteRule ^(.+)$ index.php?page=$1 [QSA]
但它不工作。整个文件在这里:
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST}^projects.test.net/rr/$ [NC]
RewriteRule ^(.*)$http://projects.test.net/rr/$1 [L,R=301]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)$ index.php?page=$1 [QSA]
设置为什么不是index.php文件设置为标准目录索引? –
谢谢,添加“DirectoryIndex index.php”修复了一切。 – The50
也作为答案添加,也许你可以标记为解决方案:) –