管理员说服务器用的是ISAPI_Rewrite3.0,伪静态文件如下:[ISAPI_Rewrite]# 3600 = 1 hour
# CacheClockRate 3600RepeatLimit 32# Protect httpd.ini and httpd.parse.errors files
# from accessing through HTTPRewriteRule ^/index\.html$ /index\.php
RewriteRule ^/slimming\.html$ /slimming\.php
RewriteRule ^/slimming-(.*)-(.*)\.html$ /slimming\.php\?id=$1&page=$2
RewriteRule ^/article-(.*)\.html$ /article\.php\?id=$1现在问题出在首页,用http://www.zytzuoxuan.com无法访问,提示403,用http://www.zytzuoxuan.com/index.html则一切正常,默认首页为index.html,不知道怎么回事,哪里写错了吗?
# CacheClockRate 3600RepeatLimit 32# Protect httpd.ini and httpd.parse.errors files
# from accessing through HTTPRewriteRule ^/index\.html$ /index\.php
RewriteRule ^/slimming\.html$ /slimming\.php
RewriteRule ^/slimming-(.*)-(.*)\.html$ /slimming\.php\?id=$1&page=$2
RewriteRule ^/article-(.*)\.html$ /article\.php\?id=$1现在问题出在首页,用http://www.zytzuoxuan.com无法访问,提示403,用http://www.zytzuoxuan.com/index.html则一切正常,默认首页为index.html,不知道怎么回事,哪里写错了吗?
给index.php所有人可执行权限看看
我楼上说的这是我前阵子在linux下解决nginx的403错误的方法。
如果没有管理权限,就手动创建一个index.html,用html实现跳转即可
应为
RewriteRule ^/index\.html$ /index.php
只有正则表达式部分才需要转义
参考 ISAPI_Rewrite 3.1 教程中文版