DWQA QuestionsCategory: Questionssubdomain code for htaccess file?
wpsaas_admin Staff asked 5 years ago

Where is that? the video says it’s ‘below’ but it’s not. Trying to setup subdomain for multi site

steph Staff replied 5 years ago

Found it: https://premium.wpmudev.org/forums/topic/how-to-convert-a-wordpress-multisite-from-subdirectory-to-subdomain

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)$ wp/$1 [L]
RewriteRule . index.php [L]