Skip to content

Instantly share code, notes, and snippets.

@wp-networks
Last active May 19, 2018 05:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wp-networks/a1460c62518b82b2a644f4489dfde9c7 to your computer and use it in GitHub Desktop.
Save wp-networks/a1460c62518b82b2a644f4489dfde9c7 to your computer and use it in GitHub Desktop.
controlling network UIs
### BEGIN Network Panel Control
## for use with: define( 'DOMAIN_CURRENT_SITE', $_SERVER['HTTP_HOST'] );
## this has some gaps, but it gets the point accross
## was made for a WP installed at like my.example.tld
## obviously, some values likely need changing if you try this, eg. my|stage|templates
<IfModule rewrite_module>
#RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /(?:/?wp-admin/network/.*)\ HTTP/ [NC]
#RewriteCond %{HTTP_HOST} \.((?:my|stage|templates)\.(?:[^\.]+)\.(?:[^\.]+)) [NC]
#optional#RewriteCond %{REMOTE_ADDR} !^my\.own\.I\.P$
#RewriteRule ^(.*)$ https://%1/$1 [R=302,L]
</IfModule>
### END Network Panel Control
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment