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:

Apache Rewrite Rules

<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine On
RewriteBase /

Add trailing slash to url

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !(.[a-zA-Z0-9]{1,5}|/|#(.))$
RewriteRule ^(.
)$ $1/ [R=301,L]

Remove .php-extension from url

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule ^([^.]+)/$ $1.php

RewriteCond $1 !^home
RewriteRule ^(.*) /home/$1 [L]

End of Apache Rewrite Rules


BEGIN WordPress

RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ - [L]

uploaded files

RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [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]

END WordPress

2 Years
Discussion Span
Last Post by cambraydesign
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.