apache配置php实现单一入口方法
这篇文章主要介绍了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}
#RewriteRule ^(.*)$ index.php?$1
</IfModule>
DirectoryIndex index.php index.html index.htm
</Directory>
http://www.zzvips.com/article/195979.html
页:
[1]