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.html index.htm
</Directory>
相关文章
Centos 通过 Nginx 和 vsftpd 构建图片服务器的教程(图文)
本篇文章主要介绍了Centos 通过 Nginx 和 vsftpd 构建图片服务器的教程(图文),具有一定的参考价值,有兴趣的可以了解一下2017-08-08
Ubuntu报“无法解析域名cn.archive.ubuntu.com“问题解决办法
在Ubuntu系统上使用sudo apt update命令更新时可能遇到“无法解析域名cn.archive.ubuntu.com”的问题,这通常是因为cn.archive.ubuntu.com的镜像资源不稳定,为解决此问题,可以更换为稳定性好、速度快的镜像源,需要的朋友可以参考下2024-11-11
CentOS7 LNMP+phpmyadmin环境搭建 第三篇phpmyadmin安装
这篇文章主要介绍了CentOS7 LNMP+phpmyadmin环境搭建,第三篇phpmyadmin安装,具有一定的参考价值,感兴趣的小伙伴们可以参考一下2017-07-07


最新评论