Posted By

j4kp07 on 07/09/10


Tagged

wordpress htaccess


Versions (?)

htaccess for Wordpress Multi-site


 / Published in: Apache
 

URL: http://perishablepress.com/press/2010/07/07/htaccess-code-for-wordpress-multisite/

Currently, multisite is easiest to setup under the following conditions: 1) WordPress for main site installed in the root directory 2) Each additional network site is created in its own subdirectory

  1. RewriteEngine On
  2. RewriteBase /
  3. RewriteRule ^index\.php$ - [L]
  4.  
  5. # uploaded files
  6. RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L]
  7.  
  8. # add a trailing slash to /wp-admin
  9. RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
  10.  
  11. RewriteCond %{REQUEST_FILENAME} -f [OR]
  12. RewriteCond %{REQUEST_FILENAME} -d
  13. RewriteRule ^ - [L]
  14. RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
  15. RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
  16. RewriteRule . index.php [L]

Report this snippet  

You need to login to post a comment.