目前我有一个域名指向的登陆页面html,但如果我访问/index.php,它会重定向回index.html。
我怎样才能使index.php可访问?
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} ^$
RewriteCond %{HTTP_HOST} ^domain.co.nz$
RewriteRule ^$ http://domain.co.nz/index.html [L,R=301]
答案 0 :(得分:0)
您正在将所有内容重定向到html文件。
陷阱>
# Enable rewiting
RewriteEngine on
Options +FollowSymLinks
# set 'default' file
DirectoryIndex index.html
# everything else goes to the index.php file, except your sites assets/
RewriteCond $1 !^(index\.php|index\.html|images|css|javascript)
RewriteRule ^(.*)$ /index.php/$1