WordPress Htaccess breaking rest of site

To start, I am hosting my website on AWS. I have a normal WordPress site in the root, with a custom application in a sub-folder. The Htaccess in the sub-folder is:

//Htaccess
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php/$0 [PT,L]

And the Htaccess in the root:

Read More
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

I have a feeling WordPress is screwing up my application in /sub/, cause it was working before I moved WordPress to the root. If you need additional info, let me know. How do I get WordPress to ignore that directory?

Related posts

1 comment

  1. You need to add default htaccess for root directory of wordpress site.
    Read out the documentation here for basic , subdomains , multisite etc.

    # 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>
    

    Place this htaccess in sub folder.

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    

Comments are closed.