Correct .htaccess in WP(MS) 3.x
-
Hiya everyone,
I’m duplicating my original post at https://premium.wpmudev.org/forums/topic/correct-htaccess-in-wpms-3x
Thought this might be interesting for guys over here as well ??OK, got a question about .htaccess in WP/WPMS 3.x
After I do a clean install of WP 3.x and enable network my .htaccess looks like this:
RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] # uploaded files RewriteRule ^files/(.+) wp-includes/ms-files.php?file=$1 [L] RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^ - [L] RewriteRule . index.php [L]
When I upgrade from WPMU I’m asked to update only 1 rule, so my .htaccess looks like this:
RewriteEngine On RewriteBase / #uploaded files RewriteRule ^(.*/)?files/$ index.php [L] RewriteCond %{REQUEST_URI} !.*wp-content/plugins.* RewriteRule ^files/(.+) wp-includes/ms-files.php?file=$1 [L] # add a trailing slash to /wp-admin RewriteCond %{REQUEST_URI} ^.*/wp-admin$ RewriteRule ^(.+)$ $1/ [R=301,L] RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule . - [L] RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-.*) $2 [L] RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L] RewriteRule . index.php [L] <IfModule mod_security.c> <Files async-upload.php> SecFilterEngine Off SecFilterScanPOST Off </Files> </IfModule>
Both differ quite a lot ??
My question here – what variant is correct for WPMS 3.x? Or do both do the same job?
Viewing 12 replies - 1 through 12 (of 12 total)
Viewing 12 replies - 1 through 12 (of 12 total)
- The topic ‘Correct .htaccess in WP(MS) 3.x’ is closed to new replies.