I have a WordPress multisite using subdomains. I have created a new website, not using wordpress, which is on the root in a folder called 'home'
I am trying to remove the 'home' from the url so that it appears that this folder is the root eg. mydomain.com instead of mydomain.com/home/
I have added the following code into my .htaccess file:
RewriteCond $1 !^home
RewriteRule ^(.*) /home/$1 [L]
This removes 'home' from the url as desired. Unfortunately it stops all of the subdomains working in wordpress, so it's bypassing wordpress completely, I still need the rest of the subdomains to be working. Is there a way to make this work? Here is the complete htaccess:
<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !(.[a-zA-Z0-9]{1,5}|/|#(.))$
RewriteRule ^(.)$ $1/ [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule ^([^.]+)/$ $1.php
RewriteCond $1 !^home
RewriteRule ^(.*) /home/$1 [L]
</IfModule>
RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ - [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L]
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]