Posted By

depiction on 04/27/11


Tagged

wordpress htaccess speed up


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

hkamci


Speed Up WordPress


 / Published in: Other
 

URL: http://www.canonicalseo.com/wordpress-performance-improvement/

Place the following in the .htaccess file, replacing the standard WordPress .htaccess code.

  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

Report this snippet  

You need to login to post a comment.