Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $ wp site option get subdomain_install
- 1
- $ wp site option get illegal_names
- array (
- 0 => 'www',
- 1 => 'web',
- 2 => 'root',
- 3 => 'admin',
- 4 => 'main',
- 5 => 'invite',
- 6 => 'administrator',
- 7 => 'files',
- 8 => 'blog',
- )
- RewriteEngine On
- RewriteBase /
- RewriteRule ^index.php$ - [L]
- # add a trailing slash to /wp-admin
- RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
- RewriteCond %{REQUEST_FILENAME} -f [OR]
- RewriteCond %{REQUEST_FILENAME} -d
- RewriteRule ^ - [L]
- RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
- RewriteRule ^([_0-9a-zA-Z-]+/)?(.*.php)$ $2 [L]
- RewriteRule . index.php [L]
- RewriteEngine On
- RewriteBase /
- RewriteRule ^index.php$ - [L]
- # add a trailing slash to /wp-admin
- RewriteRule ^wp-admin$ wp-admin/ [R=301,L]
- RewriteCond %{REQUEST_FILENAME} -f [OR]
- RewriteCond %{REQUEST_FILENAME} -d
- RewriteRule ^ - [L]
- RewriteRule ^(wp-(content|admin|includes).*) $1 [L]
- RewriteRule ^(.*.php)$ $1 [L]
- RewriteRule . index.php [L]
- // patch-forbidden-slugs.php
- <?php
- $illegalNames = get_metadata( 'site', SITE_ID_CURRENT_SITE, 'illegal_names', true );
- $blogSlug = 'blog';
- if ( in_array( $blogSlug, $illegalNames ) ) {
- exit( 'Noting to do' . PHP_EOL );
- }
- $illegalNames[] = $blogSlug;
- update_metadata( 'site', SITE_ID_CURRENT_SITE, 'illegal_names', $illegalNames );
- exit( 'Done' . PHP_EOL );
Add Comment
Please, Sign In to add comment