0℃
2012年02月01日
⁄ Apache
⁄ 被围观 28,954次+
1、首先确定Apache是否加载了Mod_rewrite 模块
方法: 检查 /etc/httpd/conf/httpd.conf 中是否存在以下两段代码 (具体路径可能会有所不同,但形式基本是一样的):
(一)LoadModule rewrite_module libexec/mod_rewrite.so
(二)AddModule mod_rewrite.c
2、检查Apache是否开启.htaccess支持
vi /etc/httpd/conf/httpd.conf
AllowOverride All #如果后面参数为None需要修改为All(大概在338行)
3、在文件/etc/httpd/conf/httpd.conf相应的主机目录配置中加入如下代码(此时须注意,如果网站是通过虚拟主机来定...
Apache伪静态, linux, WordPress, WordPress apache阅读全文
1℃
2012年02月01日
⁄ Nginx
⁄ 被围观 29,611次+
1、在相应nginx配置文件的server容器中添加下面的代码
系统运维 www.osyunwei.com 温馨提醒:qihang01原创内容©版权所有,转载请注明出处及原文链接
location / {
if (-f $request_filename/index.html){
rewrite (.*) $1/index.html break;
}
if (-f $request_filename/index.php){
rewrite (.*) $1/index.php;
}
if (!-f $request_filename){
rewrite (.*) /index.php;
}
}
例如:
vi /usr/local/nginx/conf/nginx...
linux, nginx伪静态, WordPress, WordPress nginx阅读全文
12℃
2011年12月07日
⁄ CentOS
⁄ 被围观 17,746次+
系统运维 www.osyunwei.com 温馨提醒:qihang01原创内容©版权所有,转载请注明出处及原文链接
系统运维 www.osyunwei.com 温馨提醒:qihang01原创内容©版权所有,转载请注明出处及原文链接
用户在使用linux系统的时候,需要掌握大量的命令行操作方法,在linux系统中,要用到的命令非常多,全部都记住不是一件容易的事情,下面笔者整理了一些linux系统中常用的命令,供大家参考。 (相关资料来源于网络,在这里表示感谢!)
下载地址:Linux常用命令大全 (请点击下载)
linux, linux命令阅读全文



