Apache创建rewrite规则

启用mod_rewrite模块
在conf目录的httpd.conf文件中找到
LoadModule rewrite_module modules/mod_rewrite.so

在apache/conf/extra/http-vhost.conf 文件中

正常模式

Options Indexes FollowSymLinks
AllowOverride None #禁止重写
Order allow,deny
Allow from all

rewrite模式


Options Indexes FollowSymLinks
AllowOverride All #允许重写
Order allow,deny
Allow from all

你可能感兴趣的:(Apache创建rewrite规则)