Windows+IIS下WordPress伪静态规则(二)
此次发布的伪静态,实现URL例如本文:http://yangjunwei.com/484.html
WordPress后台固定链接设置 - 自定义结构:/a/%post_id%.html
此规则中的 a 可以自定义为其它目录,只需修改代码中的 a 即可!
## ## 伪静态URL:http://yangjunwei.com/484.html ## ## 固定链接设置 - 自定义结构:/a/%post_id%.html ## [ISAPI_Rewrite] RewriteRule /a/tag/(.*) /index\.php\?tag=$1 RewriteRule /tag/(.*) /index\.php\?tag=$1 RewriteRule /(about|link|tags|sitemap) /index\.php\?pagename=$1 RewriteRule /a/category/(.*)/(feed|rdf|rss|rss2|atom)/?$ /wp-feed\.php\?category_name=$1&feed=$2 RewriteRule /a/category/?(.*) /index\.php\?category_name=$1 RewriteRule /author/(.*)/(feed|rdf|rss|rss2|atom)/?$ /wp-feed\.php\?author_name=$1&feed=$2 RewriteRule /author/?(.*) /index\.php\?author_name=$1 RewriteRule /feed /index\.php/\?feed=rss2 RewriteRule /rss.xml /index\.php/\?feed=rss2 RewriteRule /comments/feed /index\.php/\?feed=comments-rss2 RewriteRule /([0-9]+)/?([0-9]+)?/?$ /index\.php\?p=$1&page=$2 RewriteRule /a/([0-9]+)/?([0-9]+)?/?$ /index\.php\?p=$1&page=$2 RewriteRule /a/([0-9]+).html /index\.php\?p=$1 [I] RewriteRule /page/(.*)/?s=(.*) /index\.php\?s=$2&paged=$1 RewriteRule /page/(.*) /index\.php\?paged=$1 RewriteRule /a/date/([0-9]{4})([0-9]{1,2})([0-9]{1,2})/([^/]+)/?([0-9]+)?/?$ /index\.php\?year=$1&monthnum=$2&day=$3&name=$4&page=$5 RewriteRule /a/date/([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/?$ /index\.php\?year=$1&monthnum=$2&day=$3&page=$4 RewriteRule /a/date/([0-9]{4})/([0-9]{1,2})/?$ /index\.php\?year=$1&monthnum=$2&page=$3 RewriteRule /a/([0-9]+).html/(feed|rdf|rss|rss2|atom) /index\.php\?feed=rss2&p=$1 RewriteRule /a/([0-9]+).html/trackback /wp-trackback\.php\?p=$1 # For file-based wordpress content (i.e. theme), admin, etc. RewriteRule /wp-(.*) /wp-$1 [L]
张贴yangjunwei.com的客人,我会真的爱你
你好,刚刚发现雅虎yangjunwei.com ,发现它确实是真棒。我要去观看布鲁塞尔。我将不胜感激,如果你继续写关于这个主题在未来。许多人将受益于你的写作。干杯!
你好,真的很有意思,感谢yangjunwei.com
这确实解决我的问题,谢谢!
嘿。我发现您的博客使用MSN 。这是一个非常巧妙撰写的文章。我一定会到书签,并返回到学习额外的有用的信息。感谢您的职位。我一定会东山再起。诚挚的问候!
哎yangjunwei.com 謝謝您的信息,我絕對拿起任何從這裡新。我沒另一方面經驗,使用本網站的技術點,因為我經歷了重新加載該網站以前我的許多實例可以得到它的正確加載。我想如果您的虛擬主機 OK?
Youre so cool! I dont suppose Ive learn anything like this before. So good to search out someone with some unique ideas on this subject. realy thanks for beginning this up. this website is one thing that is needed on the internet, someone with a bit of originality. helpful job for bringing something new to the internet!
博主,感谢你的这篇文章,我解决了我博客伪静态问题。呵呵,不过我的目录是post 我就批量修改了你的item 为 post 现在伪静态解决了,出现两个问题。
①。在这段规则中没有guestbook ,刚开始没注意,导致后面留言板不能用,呵呵 这个倒是好办,在RewriteRule /(about|link|tags|sitemap) /index\.php\?pagename=$1
代码中加入就好了是吧 ?第二个问题,RSS地址默认是:suncnn.com/feed 现在变成了suncnn.com/post 不知道那个地方错了。
博主知道不 ? 不能用超链接!+_+
博客这样做的话,不一定是利于优化。。
我汗哪,要搞这么多的规则呀,有点头晕了。