htaccess for Wordpress Multi-site


/ Published in: Apache
Save to your folder(s)

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


Copy this code and paste it in your HTML
  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]

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

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.