今天 在windwos2012下搭建一个环境用的是apache2.4,但是在访问这样的网址下
如:www.xxx.com/xxx/xxx.html 就会报错
The requested URL /xxxx.html was not found on this server
这是新搭建的环境,apache的重写未开启,开启重写后,问题解决,方法如下:
apache 打开 httpd.conf 文件 找到
#LoadModule rewrite_module modules/mod_rewrite.so
去掉前面的#号
windows2012下安装了宝塔面板的可以直接在web模式下操作。
找到
<Directory "E:/online/webs/Apache24/htdocs">
Options Indexes FollowSymLinks
AllowOverride None =>改为 AllowOverride All
Order allow,deny
Allow from all
改完保存,然后重启apache 完全OK.