I already had a Wordpress installation in public_html/wp
directory for my primary domain name lets say domain-one.com
. Now I added an addon domain domain-two.com
with root directory as public_html/govt
. Now I installed wordpress again for domain-two.com
within directory wp
. So now I have below directory structure -
my first website i.e. domain-one.com
was and is working fine. However if I go to domain-two.com/wp/wp-admin/
it doesn't show me login/dashboard screen instead below screen is shown.
In public_html/
directory there are .htaccess
and index.php
file (for domain-one.com
), while in public_html/govt/
there are no such file.
Content of public_html/.htaccess
file
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
Content of public_html/index.php
file
<?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/wp-blog-header.php' );
What should I do so that domain-two.com
shows login/dashboard screen?
UPDATE 1: After going through this article, I created an .htaccess
file (and index.php) in public_html/govt
folder and put the below content in it. I tried with content of root folder htaccess file as well. But still the problem is same in both cases.
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /govt/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /govt/index.php [L]
</IfModule>
# END WordPress