To exclude a directory and all virtual requests to it, extend the regular rules:
# WordPress
# Images, Stylesheets etc. don't need a HTML 404
RewriteCond %{REQUEST_URI} !.+\.\w{2,4}$
# Existing file
RewriteCond %{REQUEST_FILENAME} !-f
# Existing directory
RewriteCond %{REQUEST_FILENAME} !-d
# Symbolic link
RewriteCond %{REQUEST_FILENAME} !-l
# Do not touch the directory 'clients'
RewriteCond %{REQUEST_URI} ! ^/clients/.*
RewriteRule ^ index.php [L]
Related Posts:
- How to fix: “The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.”
- How to recover WordPress Adress(URL)
- Page not found when trying to link to files in child theme directory
- Install wordpress as a development site in a subdirectory on live server
- Cannot access non-wordpress subdirectories as wordpress overrides them with a 404 error
- WordPress Migration: Getting 404 Errors: Only Home Page works
- External page integrated into WordPress returns a 404 error
- WordPress Theme’s 404.php not found, server defaults to Apache’s own 404 page
- get_the_ID() gives notice in 404 page
- How to open the 404 page in the Theme Customizer preview?
- Benefits or Problems for using Sub-Directory vs Sub-Domain install of WP Network
- Multisite: differences between subdomain and subdirectory mode? Can it be switch after installation?
- Feed 404 Errors
- NGinx + WordPress Subdomain Multi with core in Subdirectory
- Site redirects to wrong url when saving settings
- 404 when fetching image from wp-content/uploads/
- Multisite installation combining subdomains and subdirectories
- REST API: No route was found matching the URL and request method
- WordPress REST API 404
- Changing Site Address (URL) causes 404
- Detect 404 before headers are sent
- Unwanted redirect in admin area
- In wordpress I am manipulation 404 response. I want to give the response before 404 error is given to google
- 404 error on homepage when using Nginx proxying to Apache
- Non “WordPress” pages/code getting 404 error
- 404 error on all pages but homepage
- Where is the best part to hijack or catch a potential 404
- Sub-domain or 2nd, temporary different domain?
- Why is there /index.php/ in all my links? How do I remove it?
- page not found in Chrome, but found in Firefox
- Why does my WordPress show a 404 message for 403 forbidden directories?
- Moved to new server, all pages work EXCEPT home page (page not found)
- High CPU usage on 404 errors
- How to fix “failed to set referrer policy: The value ‘ ‘ is not one of…”?
- Subfolder multisite issue. Themes and plugin files 404
- “Lost password” page triggers 404
- How would you detect if WordPress is installed in a subdirectory (not root)?
- 404 to 301 – Fixing old links
- On WordPress Network(multisite), Sub Blogs in Subdirectories or Subdomains? What’s better?
- How do I bypass WordPress 404 handling?
- $error = 404 after caught add_rewrite_rule
- Second wordpress installation on subdirectory
- Change multi-site installation from sub-domains to sub-directories
- How do I go about fixing this apparently messed up upgrade?
- WordPress Stats keeps showing non-existent post as a top post?
- WP Rest API not working
- How to run a subdirectory multisite install under a subdomain
- What does do_action(‘admin_init’); does actually?
- Form in WordPress : 404
- Why is my Javascript console showing a 404 error for a file called “null” on a clean WordPress install?
- WordPress 404 on Subdomain
- Why Runtime service worker (runtime-service-worker.js) is being loaded, but can’t be found?
- Non-existent page returns code 200
- WP is redirecting instead of going to 404
- Conditional for 404 page not work
- Nginx with WordPress not showing template 404 for certain file types
- post parameter ‘name’ 404 error
- Intermittently missing pages and posts in WordPress
- Getting a 404 in Debugger for example.com/wp-admin/Array?
- Fixing custom 404 pages broken by WordPress in a subdirectory
- oEmbed 404 errors when trying to use embed block
- Intercept 404 and try to serve another content if exists?
- 404 after moving localhost wp to server
- Intermittent 404 errors, rewrite rules, and BBPress
- How do I show the WP admin error page?
- WordPress takes too long to show 404 error on images (on LEMP stack)
- Multiple wordpress installations that shares WordPress & Theme but with separated database
- Subdomain redirects to subdirectory [closed]
- WordPress Post – On Post – 404 Page Not Found
- How to find out which function is causing a 404
- Template redirect template loaded, but the header 404
- Mapping Subdomains in WordPress to give the appearance of a localised site, best approach?
- Getting 404s on New Pages
- How can I send an email in my plugin?
- Moving local wordpress page to a real server subdomain broke my permalinks?
- Multisite – 404 when accessing sub-sites
- All pages after level 1 showing 404 after WordPress migration plugin – how to fix?
- index2.php in root causing 404 error
- Why I get File Not Found (404 error) when the file is actual there?
- WP_DEBUG must be on, otherwise edit post or page will show 404 error
- multisite subdomain behind reverse proxy
- Getting “404 page not found” error when i access to my Login page
- Multisite Subdirectory with same domain subdomain
- Virtual robots.txt missing
- Moved from Blogger to WordPress, however I can only see the Google 404 page
- Custom 404 page for dashboard
- wp-tinymce.php 404
- WordPress.org support topics returning 404 [closed]
- Display child pages on parent page: 404 message overrules shortcode in page
- After changing wp from subdirectory to root I can’t preview any changes to a page or post
- One Domain, Two Installs of WordPress
- How can I prevent non-existing wordpress pages from getting redirected to home page
- Incorrect url for sharing blog on linkedin [closed]
- Catch 404 errors in nested installations
- Two WordPress installations: One in root and one in sub directory – no images in subdir installation [closed]
- Getting 404 error on my wp rewrite error
- WordPress 404 Page displaying on a sub directory that has it’s own 404 page
- redirect deleted / drafted pages
- 404 error on dynamic stylesheet creation
- Why do I have a weird rendering issue only on 404.php caused by wp_nav_menu?