Subdirectory Domain Issue
-
I have a unique situation where I had to set up a multisite at siteexample.com/wp. So what I’m trying to accomplish is that the subdirectories have to be developed first and then they will use an addon domain.
So for example, siteexample.com/wp/firstsite becomes myfirstsite.com. And siteexample.com/wp/secondsite is still in development.
My problem is that in order to get the domain to work, I have to edit the .htaccess. It gives me a 500 internal server error. But when the domain works, the subdirectories stop working and give me a 404 error. And when the subdirectories work, the domain stops working.
This is the code that allows the subdirectories to work:
RewriteEngine On
RewriteBase /wp/
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]And this is the code that allows the domain to work:
RewriteEngine On
RewriteBase /wp/
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]Is there a way that will allow both to work?
The topic ‘Subdirectory Domain Issue’ is closed to new replies.