WP Htaccess file in root folder seem to overwrite the htaccess rules in Sub Directory folder

Question

I’ll like to seek your help on htaccess.

I have WP installed at the root folder. eg: www.mywpsite.com I have the 2nd WP installed in the sub directory folder "hello". eg: >> www.mywpsite.com/hello

Problem: Unable to access the subpages of the 2nd WP site. I will hit 404. However, when I try to connect to www.mywpsite.com/hello/contactus it gets redirected to the first website in the root folder www.mywpsite.com/contactus which is not what I want.

I’ve checked my htaccess file and I am not sure what is going wrong. It looks like the root folder htaccess supersede the sub directory folder. Any advice? Thanks!

Root Htaccess File

php_flag output_buffering on
php_value expose_php off
# BEGIN WordPress
# The directives (lines) between `BEGIN WordPress` and `END WordPress` are
# dynamically generated, and should only be modified via WordPress filters.
# Any changes to the directives between these markers will be overwritten.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
RewriteEngine Off
</IfModule>
# END WordPress

Here is the Sub Directory Htaccess file

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /hello/
RewriteRule ^index.php$ – [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /hello/index.php [L]
</IfModule>
0
Kat L. 8 months 2020-11-24T22:10:20-05:00 0 Answers 8 views 0

Leave an answer

Browse
Browse