apache配置php实现单一入口方法


在apache的httpd.conf加入,需要把LoadModule rewrite_module modules/mod_rewrite.so前面的“#”去掉
?

复制代码 代码如下:

DocumentRoot /

?

<Directory />
Options Indexes FollowSymLinks MultiViews
AllowOverride None
#AllowOverride All
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteBase /
#不显示index.php

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule? ^/?(.*)$ /index.php?%{QUERY_STRING} [L,NC]
#RewriteRule ^(.*)$ index.php?$1 [QSA,L]
</IfModule>
DirectoryIndex index.php index index
</Directory>


上一篇:xampp安装后apache 80端口被占用的解决方法

下一篇:windows apache多端口虚拟主机配置方法


Copyright © 2002-2019 测速网 https://www.inhv.cn/ 皖ICP备2023010105号 城市 地区 街道
温馨提示:部分文章图片数据来源与网络,仅供参考!版权归原作者所有,如有侵权请联系删除!
热门搜索