mod_rewrite设定问题

来源:7-2 Apache的虚拟主机配置及伪静态操作

manu

2018-05-29

老师您好 我mod_rewrite 设定完后会出现 

执行网页会出现Bad Request Your browser sent a request that this server could not understand. (400)有方法可解决吗

写回答

2回答

manu

提问者

2018-05-29

问题已经解决 IfModule 应该放在Directory裡面

0
0

manu

提问者

2018-05-29

以下是我的设定

<VirtualHost *:80>

        ServerName www.manu.test

        DocumentRoot /data/www

        <Directory "/data/www">

                Options Indexes FollowSymLinks

                AllowOverride None

                Require all granted

        </Directory>

         <IfModule mod_rewrite.c>

                   RewriteEngine On

                   RewriteRule ^(.*).php$ index.html

        </IfModule>

</VirtualHost>


0
0

快速上手Linux 玩转典型应用

以主流CentOS 7 操作系统为例,系统讲解Linux,真实线上环境助你快速上手,独立配置运维服务器

1663 学习 · 572 问题

查看课程