建立好博客,设置好固定链接,发现自己的博客,访问文章都404页面!百度才知需要设置伪静态,我是vps主机,那么得自己动手解决了!
1.设置iis支持伪静态
下载 Rewrite iis伪静态组件中文版
我是百度一下从这里下载:http://www.xpgod.com/soft/5932.html
也可以这里百度云盘下载:链接: https://pan.baidu.com/s/1qYo81ty 密码: su49
按照百度经验方法安装组件(http://jingyan.baidu.com/article/27fa73269ad2fc46f8271f15.html)
2.上传httpd.ini和.htaccess
httpd.ini 源码
[ISAPI_Rewrite]
# Defend your computer from some worm attacks
#RewriteRule .*(?:global.asa|default\.ida|root\.exe|\.\.).* . [F,I,O]
# 3600 = 1 hour
CacheClockRate 3600
RepeatLimit 32
# Protect httpd.ini and httpd.parse.errors files
# from accessing through HTTP
# Rules to ensure that normal content gets through
# Protect httpd.ini and httpd.parse.errors files
RewriteRule /sitemap.xml /sitemap.xml [L]
RewriteRule /favicon.ico /favicon.ico [L]
# For file-based wordpress content (i.e. theme), admin, etc.
RewriteRule /wp-(.*) /wp-$1 [L]
# For normal wordpress content, via index.php
RewriteRule ^/$ /index.php [L]
RewriteRule /(.*) /index.php/$1 [L]
.htaccess 源码
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?s=$1 [QSA,PT,L]
</IfModule>
.htaccess 制作上传方法参照:http://jingyan.baidu.com/album/75ab0bcbe1245ad6864db217.html
2个文件上传网站根目录,就解决了!
PS:奇怪的是设置rewrite 组件的时候 竟然不用重启iis 直接生效
(文章今日已有 1 人访问,总访问量 9 ::>_<::)