我是菜鸟
描述:1)装的是wamp套件。rewrite模块已经开启。2).htaccess位置:wamp\ 资源存放位置:wamp\www\
举个简单的例子,我想把www.localhost/user.html转向www.localhost/index.php
在.htaccess里添加如下简单内容:
RewriteEngine on
RewriteRule ^user\.html$ /index.php
在浏览器输入www.localhost/user.html时总是提示404错误未找到(目录下没有该html文件,但是index.php),请教大家这是为什么呢?
描述:1)装的是wamp套件。rewrite模块已经开启。2).htaccess位置:wamp\ 资源存放位置:wamp\www\
举个简单的例子,我想把www.localhost/user.html转向www.localhost/index.php
在.htaccess里添加如下简单内容:
RewriteEngine on
RewriteRule ^user\.html$ /index.php
在浏览器输入www.localhost/user.html时总是提示404错误未找到(目录下没有该html文件,但是index.php),请教大家这是为什么呢?
应该是localhost/user.html 这样吧。