IIRF Drupal, WordPress and IIS6 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的问题,不是很好解决,上面的规则在英文站点下没有任何问题。
威海养蜂人 ooo.max.ooo

Comments

No comments yet. Why don’t you start the discussion?

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据