热烈推荐本博客子网站:免费代码网 | →美丽生活网 | →极品笑话网 | →服务器安全



服务器安全维护

typecho 伪静态规则for nginx 和 apache

apache

上传.htaccess文件到根目录,内容如下:



<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php/$1 [L]
</IfModule>



将上面的内容复制到记事本,另存为.htaccess即可。



typecho在nginx下的rewrite有好多方法
location / {
        index index.html index.php;
        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;
        }
    }



文章来自: 本站原创
引用通告: 查看所有引用 | 我要引用此文章
Tags:
相关日志:
评论: 1 | 引用: 0 | 查看次数: -
回复回复sadcfdf[2012-03-03 02:33 PM | del]
%2525252525252525252525E5%2525252525252525252525A5%2525252525252525252525BD%2525252525252525252525E5%252525252525252525252595%25252525252525252525258A%2525252525252525252525E5%252525252525252525252595%25252525252525252525258A%2525252525252525252525E5%252525252525252525252595%25252525252525252525258A%2525252525252525252525E5%252525252525252525252595%25252525252525252525258A%2525252525252525252525E5%252525252525252525252595%25252525252525252525258A%2525252525252525252525E5%252525252525252525252595%25252525252525252525258A%2525252525252525252525E5%252525252525252525252595%25252525252525252525258A%2525252525252525252525E5%252525252525252525252595%25252525252525252525258Awww.slhao.comwww.yxgao.comdfhao.5d6d.comrsqhb.5d6d.comwww.tbgao.com
发表评论
昵 称:
密 码: 游客发言不需要密码.
内 容:
验证码: 验证码
选 项:
虽然发表评论不用注册,但是为了保护您的发言权,建议您注册帐号.

Freeb资源论坛----寻找免费资源的路上,我们陪你一路通行!