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
- PHP header(Location: …): Force URL change in address bar
- php refresh current page?
- WordPress localhost site redirect to live site
- WordPress Redirect All HTTP requests to HTTPS via .htaccess
- Login redirect to previous page
- WordPress install enters an infinite loop
- WordPress HTTPS redirect loop
- 301 redirect not working through .htaccess
- Using `auth_redirect` : keeps asking me to login even when I’m logged in
- How can I move/redirect single blog posts from one blog to another?
- 302 redirect instead of 301 after switch to HTTPS
- How do I skip wordpress’s 404 handling?
- Temporary redirect prevents getting $_POST array
- Hacked website redirect, only on desktop, help with restoring it [closed]
- Sub-subdomain getting redirected to main domain
- Moving variables from one page to another
- How to create a 301 redirect that doesn’t apply to subsites
- WordPress blocking/preventing viewing of .cgi file in subdirectory [closed]
- Custom Registration page – prevent redirect to wp-login.php?action=register
- https redirect (with .htaccess) redirect loop
- How to target specific user role?
- homepage redirects to login page when user session expires
- How to redirect user to a specific page based on username?
- Redirect non-admin users away from wp-admin/index.php (main dashboard page) to wp-admin/profile.php
- Redirect blog archive into certain format
- How to publish new posts/pages in root instead of subfolder, but keep old structure in place?
- forward domain name to particular page?
- Contact Form 7 Data to Whatsapp Link
- htaccess 301 Redirect not working for WordPress site
- How can I replace my primary url globally with a parked one?
- WordPress Auto-Redirecting on 404
- I need to redirect an entire subdirectory in WordPress to the homepage – is this correct?
- My website on checking showing 403 error on HTTP Status [closed]
- I get redirected too many times only in wp-admin?
- Redirecting Pages That No Longer Exist — But Could in the Future
- How do I determine what is causing a redirect for a given page?
- Trouble running local WordPress in Google App Engine
- Empty folder being created by WordPress, breaks site
- About to migrate site to new domain
- WordPress directing to Posts page (edit.php) instead of saving post
- HTML Redirect to WP pages
- Changing theme = change home page for mobile visitors?
- Redirect User on Login based on role WP 3 – Multi-Site
- production site routes to staging site after cloning
- Redirect old URL (with different post ID) to new URL
- How to redirect an old page url to the homepage
- Custom URL routes
- Delete Redirect Slug For Specific Post
- Duplicated WP site manually, now links redirect wrong [closed]
- Load function with login_redirect
- All URLs Redirect to Main Page
- 301 redirects in Headway based WordPress Site
- Force User Login
- Import RSS as posts with redirect?
- Parked domain redirecting to wrong error404 page
- Subdomain redirect problem
- redirect from old URL structure
- How to Redirect WordPress domain.com/?anyword to 404 Page?
- How can I prevent caching of wp_redirect?
- Is the default value of FORCE_SSL_ADMIN documented?
- Redirect Category Media ‘URL’ when clicked
- Error in /blog redirection – ubuntu default WP installation
- After switch domain, some parts of my site still point to my old domain
- wordpress automatic URL ‘page’ parameter rewrite
- 302 redirect *.at/site redirecting to .comsite
- Loading /wp-content/uploads/site as /site/
- How to redirect user to the specific URL and display notice
- when contact form7 submited domain redirects to example.com means (example domain)
- WordPress not loggin user and redirecting after custom registration
- How to 301 redirect to subdirectory but keep access to wp-admin of main domain
- Pagination redirect set in .htaccess file is not working
- Count users redirected from Facebook
- automaticly redirect link problem on update
- WordPress Login Page redirecting after failed login
- Redirect after empty register form
- Debugging a redirect loop affecting only certain pages
- WordPress redirect to splash page once a day for the first week
- after logout, get_current_user_id still holds value
- Some Subdomains on a Multisite Install Not Found
- Solution for WordPress URL structure changes and 301 redirects?
- WordPress redirect from one directory to another but exclude wp-admin and wp-login.php
- How can I redirect foreigners by IP to other URL in WordPress?
- How to change Ugly link?
- How to use the HTTP API (wp_remote_get) instead of cURL?
- Is there a way to redirect people from a page on my .com website to a corresponding page on my .co.uk website if they are in the UK
- How to find out what is causing redirect of static content?