替换 .htaccess 为 WordPress 提速

林继 WordPress 2,594 共写了30个字 (2012-06-24 14:42:37) 没有评论 打印 扫描二维码 百度已收录
  1. # BEGIN WordPress
  2. RewriteEngine on
  3. #
  4. # Unless you have set a different RewriteBase preceding this
  5. # point, you may delete or comment-out the following
  6. # RewriteBase directive:
  7. RewriteBase /
  8. #
  9. # if this request is for "/" or has already been rewritten to WP
  10. RewriteCond $1 ^(index\.php)?$ [OR]
  11. # or if request is for image, css, or js file
  12. RewriteCond $1 \.(gif|jpg|css|js|ico)$ [NC,OR]
  13. # or if URL resolves to existing file
  14. RewriteCond %{REQUEST_FILENAME} -f [OR]
  15. # or if URL resolves to existing directory
  16. RewriteCond %{REQUEST_FILENAME} -d
  17. # then skip the rewrite to WP
  18. RewriteRule ^(.*)$ - [S=1]
  19. # else rewrite the request to WP
  20. RewriteRule . /index.php [L]
  21. #
  22. # END wordpress

如果觉得我的文章对您有用,请随意赞赏。您的支持将鼓励我继续创作!

发表评论

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

< >