WenRou's Blog
伪静态(wp博客)
2015-6-15 温柔哥


wp博客的伪静态可以新建.htaccess文件,添加如下代码,上传到根目录即可。(针对虚拟主机)



# BEGIN WordPress

<IfModule mod_rewrite.c>

RewriteEngine On

RewriteBase /

RewriteRule ^index\.php$ - [L]

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule . /index.php [L]

</IfModule>

# END WordPress







也可以在 .conf文件添加(有服务器权限,比如VPS)



location / {

    index index.php index.html index.htm;

    try_files $uri $uri/ /index.php?$args;

}

当然也有人是添加下面的代码



location / {

        index index.php index.html;

        if (!-e $request_filename)

        {

                rewrite ^/(.+)$ /index.php last;

        }

}






也是可行的,不过没有上面好!







评论:
奇虎分享网
2016-08-17 06:54 回复
过来看看你的博客,希望每天都更新一些文章。
小易分享网
2016-08-15 23:21 回复
今天才发现你的博客,连着看了几篇呢   http://www.xevip.cn
松露是什么
2016-01-21 10:03 回复
正解
东北松子
2016-01-21 09:31 回复
后台设置一下也行吧 固定链接那
最励志网
2015-09-19 15:10 回复
分享一下我的网站,http://www.zuilizhi.net/? 最励志网
歪妖内涵网
2015-09-15 15:21 回复
很好的网站,赞一个,加油!
卡丝
2015-08-11 16:07 回复
这样挺方便
怎么在网上赚钱
2015-08-02 16:20 回复
伪静态 wp的话 在固定链接那 填写代码也行
发表评论:
昵称

邮件地址 (选填)

个人主页 (选填)

内容