Windows虛擬主機完美實現wordpress僞靜態終極方法

 1,比如效果鏈接:http://www.jx166.com/80.html
所以就要在wordpress後面的固定鏈接—選擇自定義—填上(“/%post_id%.html”),注意後面的分類目錄前輟與標籤前輟不要改變,保持空白。
2,分類目錄是:鏈接:http://www.jx166.com/category/youhui
所以必須在分類目錄的別名裏面填上youhui,注意,別名一定要填上,而且要填寫英文或拼音。
接下來,我們就要爲我們的根目錄下面創建一個文件httpd.ini,具體內容如下,最好不要改變,如果你不是很熟悉的話,不然會出很多錯誤哦。
[ISAPI_Rewrite]
# Protect httpd.ini and httpd.parse.errors files
# from accessing through HTTP
# # 形式:/PostID.html
# # 自定義鏈接 /%post_id%.html
RewriteRule /wp-(.*) /wp-$1 [L]
RewriteRule ^/$ /index\.php [L]
RewriteRule /tag/(.*) /index\.php\?tag=$1
RewriteRule /(about|contact|about-copyright|favor|diy|archives|tags|sitemap|link|search|help|security|%e5%85%b3%e4%ba%8e)
/index\.php\?pagename=$1
RewriteRule /(search) /\?pagename=$1
RewriteRule /category/(.*)/(feed|rdf|rss|rss2|love|diy|talk|atom)/?$ /wp-feed\.php\?category_name=$1&feed=$2
RewriteRule /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 /rss.xml /wp-feed\.php/\?feed=rss2
RewriteRule /feed/?$ /wp-feed\.php/\?feed=rss2
RewriteRule /feed/?$ /index\.php/\?feed=rss2
RewriteRule /comments/feed/?$ /wp-feed\.php/\?feed=comments-rss2
RewriteRule /([0-9]+).html /index\.php\?p=$1 [I]
RewriteRule /page/(.*)/ /index\.php\?paged=$1
RewriteRule /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 /date/([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/?$ /index\.php\?year=$1&monthnum=$2&day=$3&page=$4
RewriteRule /date/([0-9]{4})/([0-9]{1,2})/?$ /index\.php\?year=$1&monthnum=$2&page=$3
RewriteRule /([0-9]+).html/(feed|rdf|rss|rss2|atom) /index\.php\?feed=rss2&p=$1
RewriteRule /([0-9]+).html/trackback /wp-trackback\.php\?p=$1
注意細節:文件保存爲ANSI格式。

相關文章:虛擬主機如何設置僞靜態規則

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章