WordPress在window2003 IIS ISAPI ReWrite下的URL規(guī)則
更新時間:2007年10月10日 23:09:03 作者:
為了便于搜索引擎抓取(換句話就是假靜態(tài)),下面是URL ReWrite的規(guī)則,效果看我的chinadigger的鏈接地址。我目前的Rewrite規(guī)則:
[ISAPI_Rewrite]
# 3600 = 1 hour
CacheClockRate 3600
RepeatLimit 32
# Protect httpd.ini and httpd.parse.errors files
# from accessing through HTTP
# WordPress rewrite rules#
RewriteRule /tag/(.*)/ /index\.php\?tag=$1
RewriteRule /(about-me|about-copyright|guest-book)/ /index\.php\?pagename=$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/?$ /wp-feed\.php/\?feed=rss2
RewriteRule /comments/feed/?$ /wp-feed\.php/\?feed=comments-rss2
RewriteRule /page/(.*)/ /index\.php\?paged=$1
RewriteRule /photo/?([^/]*)?/?([^/]*)?/?([^/]*)?/?([^/]*)?/?$ /wp-content/plugins/fgallery/fim_photos\.php\?$1=$2&$3=$4 [QSA,L,I]
RewriteRule /photo/?(.*) /wp-content/plugins/fgallery/fim_photos\.php\?$1=$2&$3=$4 [QSA,L,I]
# /%year%%monthnum%%day%/%postname%/
RewriteRule /category/(.*)/(feed|rdf|rss|rss2|atom)/?$ /wp-feed\.php\?category_name=$1&feed=$2
RewriteRule /category/?(.*)/ /index\.php\?category_name=$1
RewriteRule /([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 /([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/?$ /index\.php\?year=$1&monthnum=$2&day=$3&page=$4
RewriteRule /([0-9]{4})/([0-9]{1,2})/?$ /index\.php\?year=$1&monthnum=$2&page=$3
RewriteRule /([0-9]{4})([0-9]{1,2})([0-9]{1,2})/([^/]+)/(feed|rdf|rss|rss2|atom)/?$ /index\.php\?year=$1&monthn&day=$3&name=$4&feed=$5
RewriteRule /([0-9]{4})([0-9]{1,2})([0-9]{1,2})/([^/]+)/trackback/?$ /wp-trackback\.php\?year=$1&monthnum=$2&day=$3&name=$4&tb=1
# /post/%post_id%.html
RewriteRule /([0-9]+)/?([0-9]+)?/?$ /index\.php\?p=$1&page=$2
# RewriteRule /post/([0-9]+)/?([0-9]+)?/?$ /index\.php\?p=$1&page=$2
RewriteRule /post/([0-9]+).html /index\.php\?p=$1 [I]
RewriteRule /post/category/(.*)/(feed|rdf|rss|rss2|atom)/?$ /wp-feed\.php\?category_name=$1&feed=$2
RewriteRule /post/category/?(.*)/ /index\.php\?category_name=$1
RewriteRule /post/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 /post/date/([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/?$ /index\.php\?year=$1&monthnum=$2&day=$3&page=$4
RewriteRule /post/date/([0-9]{4})/([0-9]{1,2})/?$ /index\.php\?year=$1&monthnum=$2&page=$3
使用方法(將Wordpres安裝在根目錄)
去discuz.net的論壇下載Rewrite的壓縮包,然后按照安裝方法在IIS里面配置好Rewrite,用上面的規(guī)則覆蓋httpd.ini中原來的內(nèi)容,再到wordpress的后臺,將選項的永久鏈接部分,使用自定義,然后在框框里面填寫上面粗體部分的內(nèi)容(兩種選一種,其中# /post/%post_id%.html還不太完善),即可。
本文引用bluefeel所寫的規(guī)則。原文中TAG編寫有問題,我已經(jīng)更改完畢,大家要注意寫法,否則會影響其他IIS站點目錄。
復(fù)制代碼 代碼如下:
[ISAPI_Rewrite]
# 3600 = 1 hour
CacheClockRate 3600
RepeatLimit 32
# Protect httpd.ini and httpd.parse.errors files
# from accessing through HTTP
# WordPress rewrite rules#
RewriteRule /tag/(.*)/ /index\.php\?tag=$1
RewriteRule /(about-me|about-copyright|guest-book)/ /index\.php\?pagename=$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/?$ /wp-feed\.php/\?feed=rss2
RewriteRule /comments/feed/?$ /wp-feed\.php/\?feed=comments-rss2
RewriteRule /page/(.*)/ /index\.php\?paged=$1
RewriteRule /photo/?([^/]*)?/?([^/]*)?/?([^/]*)?/?([^/]*)?/?$ /wp-content/plugins/fgallery/fim_photos\.php\?$1=$2&$3=$4 [QSA,L,I]
RewriteRule /photo/?(.*) /wp-content/plugins/fgallery/fim_photos\.php\?$1=$2&$3=$4 [QSA,L,I]
# /%year%%monthnum%%day%/%postname%/
RewriteRule /category/(.*)/(feed|rdf|rss|rss2|atom)/?$ /wp-feed\.php\?category_name=$1&feed=$2
RewriteRule /category/?(.*)/ /index\.php\?category_name=$1
RewriteRule /([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 /([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/?$ /index\.php\?year=$1&monthnum=$2&day=$3&page=$4
RewriteRule /([0-9]{4})/([0-9]{1,2})/?$ /index\.php\?year=$1&monthnum=$2&page=$3
RewriteRule /([0-9]{4})([0-9]{1,2})([0-9]{1,2})/([^/]+)/(feed|rdf|rss|rss2|atom)/?$ /index\.php\?year=$1&monthn&day=$3&name=$4&feed=$5
RewriteRule /([0-9]{4})([0-9]{1,2})([0-9]{1,2})/([^/]+)/trackback/?$ /wp-trackback\.php\?year=$1&monthnum=$2&day=$3&name=$4&tb=1
# /post/%post_id%.html
RewriteRule /([0-9]+)/?([0-9]+)?/?$ /index\.php\?p=$1&page=$2
# RewriteRule /post/([0-9]+)/?([0-9]+)?/?$ /index\.php\?p=$1&page=$2
RewriteRule /post/([0-9]+).html /index\.php\?p=$1 [I]
RewriteRule /post/category/(.*)/(feed|rdf|rss|rss2|atom)/?$ /wp-feed\.php\?category_name=$1&feed=$2
RewriteRule /post/category/?(.*)/ /index\.php\?category_name=$1
RewriteRule /post/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 /post/date/([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/?$ /index\.php\?year=$1&monthnum=$2&day=$3&page=$4
RewriteRule /post/date/([0-9]{4})/([0-9]{1,2})/?$ /index\.php\?year=$1&monthnum=$2&page=$3
使用方法(將Wordpres安裝在根目錄)
去discuz.net的論壇下載Rewrite的壓縮包,然后按照安裝方法在IIS里面配置好Rewrite,用上面的規(guī)則覆蓋httpd.ini中原來的內(nèi)容,再到wordpress的后臺,將選項的永久鏈接部分,使用自定義,然后在框框里面填寫上面粗體部分的內(nèi)容(兩種選一種,其中# /post/%post_id%.html還不太完善),即可。
本文引用bluefeel所寫的規(guī)則。原文中TAG編寫有問題,我已經(jīng)更改完畢,大家要注意寫法,否則會影響其他IIS站點目錄。
您可能感興趣的文章:
- 在CentOS 6 中安裝 WordPress(二)安裝WordPress
- 8個出色的WordPress SEO插件收集
- WordPress入門指南-wordpress安裝使用說明
- 在CentOS 6 中安裝WordPress(一) 安裝Apache,Mysql, PHP環(huán)境
- WordPress判斷用戶是否登錄的代碼
- wordpress主題支持自定義菜單及修改css樣式實現(xiàn)方法
- WordPress導(dǎo)入數(shù)據(jù)庫出現(xiàn)”Unknown collation: ‘utf8mb4_unicode_ci”錯誤的解決辦法
- Nginx下讓W(xué)ordPress支持固定鏈接的偽靜態(tài)規(guī)則
- 用js代碼和插件實現(xiàn)wordpress雪花飄落效果的四種方法
- PHP版本升級到7.x后wordpress的一些修改及wordpress技巧
- 修改WordPress中文章編輯器的樣式的方法詳解
- WordPress 照片lightbox效果的運用幾點
- 在CentOS系統(tǒng)上從零開始搭建WordPress博客的全流程記錄
- 基于wordpress主題制作的具體實現(xiàn)步驟
- 解決安裝wordpress時出現(xiàn)ERR_TOO_MANY_REDIRECTS重定向次數(shù)過多問題
相關(guān)文章
Win7 IIS7.5運行ASP時出現(xiàn)500錯誤的解決辦法
http 500內(nèi)部服務(wù)器錯誤說明IIS服務(wù)器無法解析ASP代碼,下面為大家介紹下Win7 IIS7.5運行ASP時出現(xiàn)500錯誤的解決辦法2014-05-05IIS6.0的默認權(quán)限和用戶權(quán)限設(shè)置小結(jié)
網(wǎng)上高手整理的一些win服務(wù)器下,ntfs的權(quán)限設(shè)置2008-09-09Windows Server 2012 Server Backup之?dāng)?shù)據(jù)備份與恢
Windows Server Backup是系統(tǒng)自帶的備份和恢復(fù)組件,和Windows Server 2003中的NTbackup類似。相對于其他第三方備份軟件,Windows Server Backup由于是系統(tǒng)自帶組件,不需要額外購買授權(quán),從而減少IT開支2023-06-06最新Windows Server 2012 R2磁盤分區(qū)的詳細步驟
這篇文章主要介紹了最新Windows Server 2012 R2磁盤分區(qū)的詳細步驟,通過圖文并茂的形式介紹了假如只有一個磁盤的分區(qū)方法,需要的朋友可以參考下2022-04-04WEB 專用服務(wù)器的安全設(shè)置總結(jié)
web服務(wù)器常見的安全設(shè)置,大家可以根據(jù)自己的情況進行設(shè)置,最后先在自己的電腦上做實驗,最好用虛擬主機管理軟件,腳本之家有的下載。2009-04-04II7添加應(yīng)用程序測試時 無法驗證對路徑(c:\test\WcfService)的訪問
今天在iis7中調(diào)試程序時,提示無法驗證對路徑c:\test\WcfService,通過下面的方法解決了,特分享下方便需要的朋友2012-12-12阿里云云服務(wù)器Windows 2008下IIS添加網(wǎng)站綁定域名圖文教程
這篇文章主要介紹了阿里云云服務(wù)器Windows 2008下IIS添加網(wǎng)站綁定域名圖文教程,需要的朋友可以參考下2014-09-09