+ -
当前位置:首页 → 问答吧 → 初学PHP,关于htaccess

初学PHP,关于htaccess

时间:2011-08-31

来源:互联网

环境:windows XP + PHPnow 
htaccess文件内容 
<IfModule mod_rewrite.c>
RewriteEngine On

ErrorDocument 404 /404-1.html
#这行是起作用的

#RewriteLog "E:/Php/Web/rewrite.log"
#RewriteLogLevel 3
加上面两行 报错:RewriteLog not allowed here

RewriteBase /
#RewriteCond %{REQUEST_FILENAME} !-f
#RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule ^(.+)/index $1/aa.html [L]
#RewriteRule ^(.*)show-([0-9A-Za-z]+)\.html$ $1/index\.php\?Action=$2
#RewriteRule ^(.*)show-([0-9A-Za-z]+)\.html$ $1/\?Action=$2
上面三条规则均不起作用
</IfModule>

很少提问,Google半天无结果,实在不知如何下手解决问题,望熟手、专家来帮忙解答。

作者: pc372   发布时间: 2011-08-31

<VirtualHost *:80>
  DocumentRoot "E:/Project/htdocs/communityid"
  ServerName antoo.net
  ServerAlias www.antoo.net
  ErrorLog "logs/qdid-error.log"
  CustomLog "logs/qdid-access.log" common
  #RewriteLog "logs/qdid-rewrite.log"
  #RewriteLogLevel 9
</VirtualHost>

作者: likewu   发布时间: 2011-08-31

感谢楼上答复。
我的主要问题不在这里,是RewriteRule都不其作用 ,是不是我规则写错了?

作者: pc372   发布时间: 2011-08-31

已加分

作者: pc372   发布时间: 2011-08-31

路过,不会。。。

作者: lidandanyi   发布时间: 2011-08-31