技术交流QQ群:①185473046   ②190706903   ③203744115   网站地图
登录

下次自动登录
现在位置 >首页 > phpwind
0℃
2011年11月02日 Nginx ⁄ 被围观 10,723次+
在相应nginx配置文件的server中,添加如下代码 rewrite ^/(.*)-htm-(.*)$ /$1.php?$2; 系统运维  www.osyunwei.com  温馨提醒:qihang01原创内容©版权所有,转载请注明出处及原文链接 例如: vi /usr/local/nginx/conf/nginx.conf #编辑nginx配置文件 找到下面这行,在server_name localhost;后边一行添加上面的代码 server { listen 80; server_name localhost; rewrite ^/(.*)-htm-(.*)$ /$1.php?$2; #charset koi8-r; #access_log logs/host.access.log main; location / { root html; index index.php in...
阅读全文
2℃
2011年11月02日 Apache ⁄ 被围观 8,436次+
1、首先确定Apache是否加载了Mod_rewrite 模块 方法: 检查 /etc/httpd/conf/httpd.conf 中是否存在以下两段代码 (具体路径可能会有所不同,但形式基本是一样的): (一)LoadModule rewrite_module libexec/mod_rewrite.so (二)AddModule mod_rewrite.c 如果存在,那么在文件/etc/httpd/conf/httpd.conf相应的主机目录配置中加入如下代码。(此时须注意,如果网站是通过虚拟主机来定义,请务必加到虚拟主机配置中去,否则可能无法使用。) 我这里虚拟主机的配置文件是/etc/httpd/conf.d/vhost.conf vi /etc/httpd/co...
阅读全文


Copyright© 2011-2024 系统运维 All rights reserved
版权声明:本站所有文章均为作者原创内容,如需转载,请注明出处及原文链接
陕ICP备11001040号-3