Just use a RedirectMatch 404 in your WordPress .htaccess:
RedirectMatch 404 ^/(sub-folder-1|sub-folder-2)(/.+)?$
Related Posts:
- Host the wp-admin on another domain?
- Site redirects to wrong url when saving settings
- Can I check for maintenance mode before redirecting to subdomain?
- Force WordPress to load from site’s hostname
- Some admin pages redirecting to front page on save
- Two WordPress installations: One in root and one in sub directory – no images in subdir installation [closed]
- How to redirect the frontend of a WordPress site (only)?
- Permalinks do not include www subdomain
- Redirect user to specific link after login
- When i try to enter subdomain i’m redirected to main domain
- Can’t login to WordPress admin panel after changing domain to use WordPress pages as a fallback from React
- How do I share a site only to one User at the time? Please help π₯Ίπ
- Need to redirect from Apache2 Ubuntu Default Page to home page in wordpress
- How to block direct access to files upload in edd folder
- Top-level staging-site URL redirects to a different site
- Redirect Restricted Page to 404
- Redirect to dashboard after login
- Make a video post redirect to next post after completion
- Redirect blog page to latest post?
- WordPress Redirect based on the prescence of a cookie
- Links to an exisiting Page are now redirecting to a draft page?
- Remove lost password form and URL
- add_rewrite_rule to pass entire path as a single parameter
- How To Only Allow Users To View Their Own Buddypress Profiles? [closed]
- htaccess redirect dynamic posts
- RedirectMatch and Redirect interfering with each other
- Menu links only using http after enabling https, unable to redirect http links
- Redirect all pages to homepage but still allow dashboard
- some url does not redirect from http to https
- Why can’t I access files / directories outside of wordpress
- How to Redirect login User with Mapped Domiain Primary blog Url to Original Sub-site Url
- Change ‘Back To Website’ link in wp-login.php
- How do I map a subdomain in wordpress to the primary domain in a multisite setup?
- Redirect the non-www version of the site to the www
- htaccess rules not applied?
- Redirect subdomain in Multisite installation?
- Intercept the “lost password” action by first redirecting to an existing instructions page
- How to pass email values from one php page to another
- How to redirect after login getting a variable from url (for example with the language)
- How to set 301 redirection after moving WordPress blog?
- How to include error message on login
- How to use a custom domain?
- Changing siteurl and homeurl – internal links redirect to home page?
- WooCommerce unexpected behavior [closed]
- redirect Login problems
- 301 redirection editing .htaccess doesn’t work
- Redirect custom post type from one domain to another domain
- 301 redirect instead of 404 when URL is a prefix of a post or page name?
- 301-redirect directives for blogger to wordpress migration
- Redirect users after register (first login) and force submit post
- Stop Redirecting to and from www
- .htaccess 301 redirect conflict with plugin “WordPress Https”
- Disable WordPress URL auto complete
- Problem in disabling canonical 301 redirect
- Prevent users from going to wordpress profile after login
- How to redirect just one or two blog posts correctly?
- Why does the $_GET parameter ?search forward the front-page to the archive/blog page
- Keep subcategory grandson in slug
- Force WordPress https redirect before www redirect based on site address url
- Prevent wordpress autoredirect
- How to redirect only 404 pages with htaccess in WordPress
- My site is being redirected to itself
- Front page is being directed to an unknown site
- Redirect away from page if user is not admin
- Domain redirect to wp-admin/setup-config.php file
- redirect to a child theme based on the town of Internet users in france with the verification of the ip address
- Redirect to parent page if child does not exist
- How do I change the home page to the registered user’s profile page
- Conditional Redirect
- Upload Directory question
- Redirect Page ID, based on logged-in User Role
- How can I stop redirecting from a search to a taxonomy archive page
- htaccess redirect not working for wp-admin/edit in site using proxy
- How to access my wordpress application using two URLs?
- Redirect Pending Review Status Preview page url to custom url
- Debugging issue with redirection in WordPress
- Better, more efficient redirecting
- Internal Redirections?
- WordPress website down with error “redirected you too many times.”
- Make custom post type archive for administrator only
- Using cache brokes redirecting
- How to 301 redirect sub domain post URL to root domain
- How to redirect new registrars to a custom registration page instead of WP default registration page?
- WordPress redirect users from certain countries to subpage of language version
- When redirecting all URLs to homepage, what exceptions do I need to make?
- Unable to access WP test site
- Custom Login Plugin Redirects to wp-login.php After Site Migration
- Force SSL on a single page which is used as iFrame
- Logging back into WordPress after logging out and having issues with ‘loggedout=true’ in redirect URL
- Redirect posts to sub domain except pages
- Moving an ASP Site to WordPress – Looking for Help on Redirects
- WordPress subfolders htaccess bypassing the root htaccess RewriteRule
- Rewrite Rule working different than expected
- WordPress Redirecting Form Action to Home Page
- Redirect to Homepage if URL contains string
- How to redirect to a page after submitting form data?
- How to setup an automatic redirect for when there has been a critical error on the site?
- How to force HTTP and stop SSL completey on WordPress website
- How to Setup 2 Domains on a Single WordPress (Regions Filter)?
- WordPress keeps redirecting to root site after saving any setting