WordPress在window2003 IIS ISAPI ReWrite下的URL規(guī)則
更新時(shí)間: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的后臺(tái),將選項(xiàng)的永久鏈接部分,使用自定義,然后在框框里面填寫上面粗體部分的內(nèi)容(兩種選一種,其中# /post/%post_id%.html還不太完善),即可。
本文引用bluefeel所寫的規(guī)則。原文中TAG編寫有問題,我已經(jīng)更改完畢,大家要注意寫法,否則會(huì)影響其他IIS站點(diǎn)目錄。
復(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的后臺(tái),將選項(xiàng)的永久鏈接部分,使用自定義,然后在框框里面填寫上面粗體部分的內(nèi)容(兩種選一種,其中# /post/%post_id%.html還不太完善),即可。
本文引用bluefeel所寫的規(guī)則。原文中TAG編寫有問題,我已經(jīng)更改完畢,大家要注意寫法,否則會(huì)影響其他IIS站點(diǎn)目錄。
您可能感興趣的文章:
- 在CentOS 6 中安裝 WordPress(二)安裝WordPress
- 8個(gè)出色的WordPress SEO插件收集
- WordPress入門指南-wordpress安裝使用說明
- 在CentOS 6 中安裝WordPress(一) 安裝Apache,Mysql, PHP環(huán)境
- WordPress判斷用戶是否登錄的代碼
- wordpress主題支持自定義菜單及修改css樣式實(shí)現(xiàn)方法
- WordPress導(dǎo)入數(shù)據(jù)庫出現(xiàn)”Unknown collation: ‘utf8mb4_unicode_ci”錯(cuò)誤的解決辦法
- Nginx下讓W(xué)ordPress支持固定鏈接的偽靜態(tài)規(guī)則
- 用js代碼和插件實(shí)現(xiàn)wordpress雪花飄落效果的四種方法
- PHP版本升級(jí)到7.x后wordpress的一些修改及wordpress技巧
- 修改WordPress中文章編輯器的樣式的方法詳解
- WordPress 照片lightbox效果的運(yùn)用幾點(diǎn)
- 在CentOS系統(tǒng)上從零開始搭建WordPress博客的全流程記錄
- 基于wordpress主題制作的具體實(shí)現(xiàn)步驟
- 解決安裝wordpress時(shí)出現(xiàn)ERR_TOO_MANY_REDIRECTS重定向次數(shù)過多問題
相關(guān)文章
Win2008遠(yuǎn)程控制確保安全的設(shè)置技巧
在規(guī)模稍微大一些的局域網(wǎng)工作環(huán)境中,網(wǎng)絡(luò)管理員時(shí)常會(huì)采用遠(yuǎn)程控制方式來管理服務(wù)器或重要工作主機(jī);2009-10-10
IIS7.5 http 1.1 新建應(yīng)用程序失敗的解決方法
這篇文章主要介紹了IIS7.5 http 1.1 新建應(yīng)用程序失敗的解決方法,備注下,是ASP的網(wǎng)站,需要的朋友可以參考下2014-06-06
IIS6.0 IIS7.5應(yīng)用程序池自動(dòng)停止的解決方法
在日志中發(fā)現(xiàn)IIS7.5的應(yīng)用程序池自動(dòng)停止,同時(shí)訪問網(wǎng)站提示:HTTP Error 503,The service is unavailable.. 的錯(cuò)誤,搜遍整個(gè)互聯(lián)網(wǎng)總算是解決了問題。小編也整理了IIS6及IIS7.5遇到此類問題匯總解決方法,歡迎大家嘗試2015-09-09
Win2008服務(wù)器或VPS安全配置基礎(chǔ)教程
這段時(shí)間剛好在使用Windows Server 2008服務(wù)器,而這個(gè)系統(tǒng)的服務(wù)器安全設(shè)置教程不是很多,因此按自己的思路總結(jié)出一個(gè)完整的教程,希望對(duì)同樣使用windows service 2008服務(wù)器或VPS的站長有所幫助2012-08-08
防止aspxspy木馬列服務(wù) iis信息 執(zhí)行命令提權(quán)等操作
處于安全考慮,對(duì)服務(wù)器安全進(jìn)行設(shè)置。上傳aspxspy測(cè)試2012-11-11
遠(yuǎn)程桌面登錄藍(lán)色屏幕、不顯示桌面怎么解決?
有時(shí)候由于不當(dāng)操作使Windows服務(wù)器或vps遠(yuǎn)程桌面出現(xiàn)藍(lán)屏或者黑屏!比如你從本機(jī)拷貝一個(gè)很大的文件到服務(wù)器里,致使服務(wù)器反應(yīng)不過來,下次在登錄的時(shí)候就會(huì)出現(xiàn)上次的這種問題,那么這個(gè)時(shí)候遇到此問題2011-07-07
Windows Server 2012搭建文件服務(wù)器的詳細(xì)步驟
這篇文章主要介紹了Windows Server 2012搭建文件服務(wù)器的步驟,本文一步步通過圖文并茂的形式給大家介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或工作具有一定的參考借鑒價(jià)值,需要的朋友可以參考下2021-09-09

