I have installed my WordPress on my website and I'm using permalinks, but I have a folder called x in the main root of my website I can't access it now when I type http://mywebsite/x
it redirects me to error 404 not found. That's because WordPress is trying to fitch the story that called x in the database. How can I exclude that folder and its childern "folders" from wrodpress calculations?
Asked
Active
Viewed 7,963 times
3
-
1tip: http://wordpress.stackexchange.com is the place for WordPress Questions! – edelwater Nov 26 '10 at 22:39
2 Answers
3
The .htaccess
file in the root of your website's directory contains a RewriteRule which redirects every incoming request to Wordpress's bootstrapper. It probably looks something like this:
RewriteRule ^(.+)$ index.php?$1 [QSA,L]
You should add two Conditions to this Rule. These conditions provide exceptions that make sure the Rule is only executed if there is no (!
) file (-f
) or no directory (-d
) available that matches the requested URL:
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)$ index.php?$1 [QSA,L]
That should do the trick.

Martijn Heemels
- 3,529
- 5
- 37
- 38
-
Tried this solution, but it is not working. Could you please take a look at this thread? https://stackoverflow.com/questions/48809023/unable-to-upgrade-zencart-because-wordpress-is-not-allowing-to-access-subfolder – Biju P Dais Feb 16 '18 at 12:35
0
check .htaccess file, that could be a problem. (redirection if page does not exist, in your case, http://mywebsite/x/index.html or .php does not exist)

slobodan
- 199
- 1
- 4