WordPress在IIS ISAPI ReWrite下的URL规则
2019-03-10 12:00:16来源: 互联网 阅读 ()
为了便于搜索引擎抓取,俺们可以将wordpress进行静态URL重写、下面是URL ReWrite的规则!
下面是Rewrite规则:(请将下面代码内容存到httpd.ini,然后选择一种”红色部份”的内容填写到wordpress后台自定链接的”永远链接”)
点这里下载适用于wordpress2.5版本的httpd.ini文件
[ISAPI_Rewrite] # 3600 = 1 hour RepeatLimit 32 # Protect httpd.ini and httpd.parse.errors files RewriteRule /tag/(.*) /index\.php\?tag=$1 RewriteRule /(about|copyright|leebolin)/ /index\.php\?pagename=$1 RewriteRule /category/(.*)/(feed|rdf|rss|rss2|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 /feed/?$ /wp-feed\.php/\?feed=rss2 RewriteRule /comments/feed/?$ /wp-feed\.php/\?feed=comments-rss2 RewriteRule /page/(.*)/ /index\.php\?paged=$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&monthnum=$2&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 # # WordPress rewrite rules# RewriteRule /tag/(.*) /index\.php\?tag=$1 RewriteRule /(about|copyright|leebolin|favor|archives)/ /index\.php\? pagename=$1 RewriteRule /Html/category/(.*)/(feed|rdf|rss|rss2|atom)/?$ /wp-feed\.php\? category_name=$1&feed=$2 RewriteRule /Html/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 /comments/feed/?$ /wp-feed\.php/\?feed=comments-rss2 RewriteRule /([0-9]+)/?([0-9]+)?/?$ /index\.php\?p=$1&page=$2 # RewriteRule /Html/([0-9]+)/?([0-9]+)?/?$ /index\.php\?p=$1&page=$2 RewriteRule /Html/([0-9]+).html /index\.php\?p=$1 RewriteRule /page/(.*)/ /index\.php\?paged=$1 RewriteRule /Html/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 /Html/date/([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/?$ /index\.php\? year=$1&monthnum=$2&day=$3&page=$4 RewriteRule /Html/date/([0-9]{4})/([0-9]{1,2})/?$ /index\.php\? year=$1&monthnum=$2&page=$3 RewriteRule /Html/([0-9]+).html/(feed|rdf|rss|rss2|atom)/ /index\.php\? feed=rss2&p=$1 RewriteRule /Html/([0-9]+).html/trackback/ /wp-trackback\.php\?p=$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] RewriteRule ^(.*)/archiver/([a-z0-9\-]+\.html)$ $1/archiver/index\.php\?$2 fid=$2&page=$3 tid=$2&extra=page\%3D$4&page=$3 RewriteRule ^(.*)/archiver/([a-z0-9\-]+\.html)$ $1/archiver/index\.php\?$2 |
点这里下载适用于wordpress2.5版本的httpd.ini文件
标签:
版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com
特别注意:本站所有转载文章言论不代表本站观点,本站所提供的摄影照片,插画,设计作品,如需使用,请与原作者联系,版权归原作者所有
上一篇:事件营销将成为“营销时代”主流
下一篇:admin5站长网举办域名周活动
- IIS自动申请部署免费SSL证书服务 2019-04-10
- 如何选择和使用wordpress主题制作特色网站 2019-04-10
- WordPress网站搭建如何购买域名及域名绑定 2019-04-10
- 两款插件快速实现,wordpress全站开启https 2019-04-10
- 为什么选择 WordPress CMS来建站的9个理由 2019-04-10
IDC资讯: 主机资讯 注册资讯 托管资讯 vps资讯 网站建设
网站运营: 建站经验 策划盈利 搜索优化 网站推广 免费资源
网络编程: Asp.Net编程 Asp编程 Php编程 Xml编程 Access Mssql Mysql 其它
服务器技术: Web服务器 Ftp服务器 Mail服务器 Dns服务器 安全防护
软件技巧: 其它软件 Word Excel Powerpoint Ghost Vista QQ空间 QQ FlashGet 迅雷
网页制作: FrontPages Dreamweaver Javascript css photoshop fireworks Flash