Answer the question
In order to leave comments, you need to log in
Exclude folder and subfolders from wp url processing?
Hi all. The situation is this:
At the root of the site is a folder with scripts, in which your php scripts. In short - redirects that process incoming links. You need to exclude this folder from processing by WordPress. For example, the script there handles urls like site.com/gogo/ or site.com/gogo/gomore.
If there is no problem with site.com/gogo/, then the wp intercepts links like site.com/gogo/gomore. Here's how to prevent him from processing the go directory on apache at all?
if I enter something like this RewriteCond %{REQUEST_URI} !^/(gogo/.*)$ then for site.com/gogo/gomore The requested URL was not found on this server.
Thank you.
Answer the question
In order to leave comments, you need to log in
Given that you mention the problem with subfolders, you need to try it with your hands.
Try the two lines below, adding them before the RewriteCond %{REQUEST_FILENAME} !-f
. This is if you have a standard WordPress .htaccess.
These are two independent options, try one first, then the other. Replace excluded_folder
with the real name of your top folder.
RewriteCond %{REQUEST_URI} !^/(excluded_folder|excluded_folder/.*)$
RewriteRule ^excluded_folder(/.*)?$ - [L,NC]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question