标签为 wordpress 的存档

WordPress URL Rewrite

WordPress URL Rewrite 在 windows IIS下最完美的解决方案。
这种方法适合能自己管理服务器或者和你的空间商搞好关系,要他们帮你安装个免费的ISAPI扩展插件,直接就可以使用 WordPress 的永久固定链接。
ISAPI插件地址:http://www.binaryfortress.com/wordpress-url-rewrite/
IIS下演示 看: http://blog.tensay.com

使用的是www.wangku.org 的美国服务器 网酷美国主机 美国空间完美支持 wordpress

IIRF for wordpress

==========================

RewriteRule ^/(?!index\.php|wp-|xmlrpc)(.*)$ /index.php/$1 [I,L]

#RewriteRule ^/(?!index.php)(?!wp)([^\.]*)$ /index.php/$1 [I]
#RewriteRule ^/category/diy /?cat=3
#RewriteRule ^/category/general /index.php?cat=1
#RewriteRule ^/category/house_reno /index.php?cat=4
#RewriteRule ^/category/pets /index.php?cat=138
#RewriteRule ^/category/photography /index.php?cat=5
#RewriteRule ^/page/([^/]+)$ /index.php?page_id=$1
#RewriteRule ^/tag/([^/]+)$ /index.php?tag=$1

==========================
IIRF的wordpress rewrite 规则
英文肯定没问题,没做测试,中文应该不是很好处理.

Drupal  (all versions)

RewriteCond %{HTTP_HOST} ^(www\.yourdomainname\.com).*$ [I]
RedirectRule ^/(.*)$ http://yourdomainname.com/$1 [I,R=301]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^/(?!favicon.ico$)([^?]*)(?:\?(.*))?$ /index.php?q=$1&$2 [L]

WordPress (all versions)

RewriteCond %{HTTP_HOST} ^(yourdomainname\.com).*$ [I]
RedirectRule ^/(.*)$ http://www.yourdomainname.com/$1 [I,R=301]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^/(.*)$ /index.php/$1 [L]

IIS下rewrite存在的主要问题还是中文分类和tag的问题,不是很好解决,上面的规则在英文站点下没有任何问题。

IIS下 wordpress也可以有完美的rewrite
包含三种常用永久链接规则:

  • /post/%post_id%.html
  • /%year%/%monthnum%/%day%/%postname%/
  • /%year%/%monthnum%/%day%/%postname%.html
  • iis下 isapi_rewrite的规则 (全文…)

    我就把整个中文标题作为网址rewrite,这样搜索引擎对我很友好。
    wordpress2.9对iis的支持局限性还是很大的,2008的iis7可能会好一点,但是实际效果还是不如linux+apache的.htaccess效果好。
    搜索引擎对网址中的文字好像更喜欢。
    在iis和linux直接换来换去,rewrite方式也变来变去,还是linux下好。
    现在的wordpress如果要做seo一定要用linux.
    买空间推荐www.wangku.org 的 三款linux机器。 价格便宜 速度快。