I have two wordpress installations - each in their own directory - on my one main domain. like mydomain.com/site1
and mydomain.com/site2
By default when visiting mydomain.com
it redirects to mydomain.com/site1
I am unsure where this redirect is coming from. There is no .htaccess file in the root of the main domain mydomain.com
nor any Index.php file in the root of the main domain.
I have also checked both .htaccess files of each directory installation mydomain.com/site1
and mydomain.com/site2
and do not seem to find what is causing the main domain mydomain.com
to redirect to mydomain.com/site1
My main goal is to change the main domain mydomain.com
to redirect to mydomain.com/site2
by default
The contents of each .htaccess are as follows:
Site 1 .htaccess
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /site1/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /site1/index.php [L]
</IfModule>
# END WordPress
# BEGIN wtfdivi
# END wtfdivi
Site 2 .htaccess
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /site2/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /site2/index.php [L]
</IfModule>
# END WordPress
# BEGIN wtfdivi
# END wtfdivi
The contents of both directories Index.php (mydomain.com/site1
and mydomain.com/site2
)are identical as follows
<?php
/**
* Front to the WordPress application. This file doesn't do anything, but loads
* wp-blog-header.php which does and tells WordPress to load the theme.
*
* @package WordPress
*/
/**
* Tells WordPress to load the WordPress theme and output it.
*
* @var bool
*/
define('WP_USE_THEMES', true);
/** Loads the WordPress Environment and Template */
require( dirname( __FILE__ ) . '/wp-blog-header.php' );