Last active
September 22, 2016 08:22
-
-
Save derpixler/4dde34a174946d5a37c4437dcf1b1139 to your computer and use it in GitHub Desktop.
Multiblemultisite in subfolder
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteBase / | |
RewriteRule ^index\.php$ - [L] | |
# add a trailing slash to /wp-admin | |
RewriteRule ^(?:([_0-9a-zA-Z-]+)/?){0,2}wp-admin$ $1/wp-admin/ [R=302,L] | |
RewriteCond %{REQUEST_FILENAME} -f [OR] | |
RewriteCond %{REQUEST_FILENAME} -d | |
RewriteRule ^ - [L] | |
RewriteRule ^(?:(?:[_0-9a-zA-Z-]+)/){0,2}(wp-(admin|includes).*) wp/$1 [L] | |
RewriteRule ^(?:(?:[_0-9a-zA-Z-]+)/){0,2}(.*\.php)$ wp/$1 [L] | |
RewriteRule . index.php [L] | |
</IfModule> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php #place this at wp-content/ | |
if ( !defined( 'SUNRISE_LOADED' ) ) | |
define( 'SUNRISE_LOADED', 1 ); | |
/* extendes url segmente to 2 */ | |
add_action( 'site_by_path_segments_count', function (){ return 2; } ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment