To effectively disable that condition for that one URL-path, you will need to add another rule immediately before the rule in question. ie. before the # Abuse Agent Blocking
comment.
For example:
# Allow an empty User-Agent for requests that start "/wp-content/uploads/xmls"
RewriteCond %{HTTP_USER_AGENT} ^$
RewriteRule ^wp-content/uploads/xmls - [S=1]
# Abuse Agent Blocking
RewriteCond %{HTTP_USER_AGENT} ^[Ww]eb[Bb]andit [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^$ [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^Acunetix [NC,OR]
: etc.
The first rule skips the following rule if the requested URL-path starts /wp-content/uploads/xmls
and the User-Agent
header is empty. So, it effectively bypasses the rule that would otherwise block it.
This does assume that the request maps to a physical file in that directory. ie. Not a request that would otherwise be rewritten to the WordPress front-controller (index.php
).
Related Posts:
- How can i redirect one url to another url using .htaccess or add_rewrite_rule
- mod_rewrite loop, redirecting http to https on certain section of wordpress blog
- I can access subdirectory, but not files within it
- How can I use an .htaccess file in Nginx?
- htaccess – Redirect to subfolder without changing browser URL
- Getting a 500 Internal Server Error on Laravel 5+ Ubuntu 14.04
- Place static HTML files in path below WordPress page
- htaccess rewrite for author query string when WP is in subfolder
- Rewrite /?rest_route=/ link to /wp-json/ without changing default permalink structure in apache
- Remove year and month in URL using .htaccess
- index.php not loading in main folder of wordpress
- Rewrite rule not working
- WordPress multisite causing Error 101 (net::ERR_CONNECTION_RESET): Unknown error [duplicate]
- .htaccess redirects disappeared after re-saving permalinks
- Protect Upload Folder Files With Ampersand Problem
- Remove File Extension for Page Outside of WordPress
- WordPress URL/Folder ReWrite using Htaccess
- WordPress mod_rewrite is canceling/overwriting my other mod_rewrite rule
- Redirect from different port to subdomain – htaccess
- WordPress 404 on Subdomain
- Only expose routes with prefix /wp-json on WordPress using Apache
- What’s the opposite of required valid user in .htaccess authentication
- Restrict uploaded files into a custom folder to logged in users by htaccess: looking for Nginx – not only Apache – solution
- How do I test to ensure that my wp-config file is protected?
- .htaccess Security Header Rules
- .htaccess in subdir gets ignored by WordPress’ own .htaccess in /
- blocking access to all post/tag URIs via htaccess
- Site in subfolder – all pages work except home
- Directing subdomain to main domain and keeping the subdomain format with .htaccess
- WordPress – Promoting A Dev Build In A Subdirectory To Production / Root Directory
- htaccess, site and staging in subdirectories
- How to write .htaccess so that https is on for subpages only but not the home page
- How to create a redirect in the .htaccess file, with 2 exceptions
- Redirect old domain with query paramaters
- 404 error Additionally 403 Forbidden error on a URL
- Custom rewrite rule, url returning 404
- mod_rewrite doesn’t work as I want even with JSON API Plugin disabled
- Does WP suppresses .htaccess if permalinks are disabled?
- I have a page using a pretty url and a mod_rewrite rule matching it. I expected it to give an error but it’s working. Why?
- Redirect – remove custom query string
- disable WordPress 404 for one specific page/folder to receive actual php errors
- .htaccess Non-‘www’ to ‘www’ Subdomain Redirection Only Works for Homepage
- fix 302 redirection error on https
- Access sub-domain when root public_html is protected with .htaccess password
- Accepting special characters in querystring
- WordPress permalinks confusion
- How can I create a smarter .htaccess file that will add a directory?
- Configure .htaccess to have a WordPress single site installation with all subdomains pointing to the same pages?
- Rewriting subfolders to specific parent folder in WordPress
- Redirect WordPress site to a landing (construction) page using htaccess, with access to /wp-admin and /invoice
- htaccess redirect to path
- URL Rewrite 404
- Unable leverage Browser Caching on AWS Bitnami stack (Apache) through W3TC and Cloudfront CDN
- How to move wordpress website from hosting account to localhost
- How to block wordpress admin by htaccess
- htaccess mod_rewrite not working
- Add-on domain works in WordPress but links still lead to subdomain
- Can’t get pretty permalinks to work without index.php
- WordPress redirection
- How To Add CSP frame ancestors in WordPress Website? [closed]
- Subfolder install not working
- Browser Caching .htaccess
- How to enable mod_rewrite for Apache 2.2
- .htaccess: Invalid command ‘RewriteEngine’, perhaps misspelled or defined by a module not included in the server configuration
- Apache mod_rewrite Infinite Loop when Accessing WordPress Admin Dashboard
- htaccess problem after saving Settings
- File and directory permissions
- Name-based virtual host configuration in Apache seems to cause a “500 Internal Server Error”
- WordPress Multisite – Multiple subfolders for blogs
- Isolating WordPress to a subfolder
- Error 101 after upgrading WordPress
- What is the role of .htaccess file in WordPress?
- Block only external access to wp-cron.php on OpenLiteSpeed
- WordPress On subfolder
- Why is my mod_rewrite not working?
- browser caching not disabled after disabling in .htaccess
- .htaccess rule to redirect old URLs to new structure [closed]
- Adding a SSL Certificate
- How To Fix A Redirect Chain
- .htaccess RewriteCond excluding directories does not work when there is an .htaccess or php.ini in subdirectory
- Weird behavior of Dashboard, must be core files
- Remove trailing slash after .html extension
- How do I setup htaccess for 301 redirects, post Joomla to WordPress migration? [closed]
- Hide a subdirectory on my website hosting
- Can’t access WP site over WiFi network
- I am new in word pres my font awesome is not allow
- htaccess redirect throws an error: PHP Catchable fatal error: Object of class WP_Error could not be converted to string
- WordPress How to rewrite URL for custom pages
- How to properly give WordPress its own directory
- WordPress permalinks is wrong. It wants me to change my htaccess file. But then site crashes
- Question with .htaccess and wp-login.php prevention
- WordPress RSS feed to external XML
- Does htaccess password keep search engines out?
- Pretty permalinks (again)
- What to do after a wrong RewriteRule?
- htaccess old php pages to new wordpress ones
- different CNAME to corresponding subfolders
- Allowing access to certain WordPress created pages or posts with htaccess / htpasswd
- Add rewrite endpoint and .htaccess
- .htaccess seems to be required but I can not find it