Unable to access my folder due to WordPress

I installed my WordPress on my site and I use permalinks, but I have a folder named x in the main root of my site. I can’t access it when I type http://mywebsite/x , it redirects me to 404 Not Found error. This is because WordPress is trying to customize a story called x in the database. How can I exclude this folder and its childern folders from wrodpress calculations?

+2
source share
2 answers

The .htaccess file at the root of your site’s directory contains a RewriteRule that redirects every incoming request to the Wordpress downloader. It probably looks something like this:

 RewriteRule ^(.+)$ index.php?$1 [QSA,L] 

You must add two conditions to this rule. These conditions provide exceptions that ensure that the rule is only executed if there is no ( ! ) File ( -f ) or there is no directory ( -d ) that matches the requested URL:

 RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.+)$ index.php?$1 [QSA,L] 

That should do the trick.

+2
source

check the .htaccess file, this can be a problem. (redirection if the page does not exist, in your case http: //mywebsite/x/index.html or .php does not exist)

0
source

All Articles