If my website had a directory called dogs (/dogs/) and I had 100 pages like this: –
https://www.codehaven.co.uk/dogs/page1/
https://www.codehaven.co.uk/dogs/page2/
https://www.codehaven.co.uk/dogs/page3/
I would not want to use a plugin to redirect every page manually.
Therefore a redirect rule that looks for /dogs/ is useful like below.
RewriteEngine on
RewriteCond %{REQUEST_URI} /dogs/
RewriteRule .* /
Related Posts:
- How to prevent redirect to ‘About’ after core upgrade?
- How to configure nginx to redirect requests to the uploads directory to the production server?
- Old blog/ and blog/feed/ URLs not working after moving blog to top-level via .htaccess
- Force HTTPS using .htaccess – stuck in redirect loop
- Why does WordPress automatically redirect URLs with the parameter “name=” to a different page?
- WordPress redirect loop on nginx + apache reverse proxy
- Redirect from https to http or from http to https? [closed]
- URL Redirect and Bulk Actions in wp_list_table
- Redirect too many times htacces switching to https
- Check if post is in draft or pending review?
- Disabling the X-Redirect-By response header
- How to hide that a certain non-WordPress directory exists on the server?
- Disabling HTTPS redirection for migration
- Redirect deleted posts to category archive
- Can WordPress pass through a call to an external API and return the result directly to the client?
- Redirecting old post url to 404 in wordpress using htaccess
- How to redirect subcategories to a page?
- Migrating from http to https
- CNAME vs A Record for WWW – with 301 Redirects
- Any action in wordpress redirects me to home page
- Handle regular expression based redirects without .htaccess
- Adding rewrite rule dynamically for search results redirecting to 404 URL
- how to setup .htaccess: redirect/ /%postname% to /%category%/%postname%
- Redirect some of the languages on a multi-language site
- WordPress keeps redirecting subpages without http to https homepage after switch
- https – too many redirects
- How to remove the [L] Flag for WordPress index .php mod_rewrite
- ReDirect subfolder link to another sub-folder and force SSL
- How do I remove the RSS Feed Redirect?
- Why does WordPress redirect when I separate wp-core and wp-content?
- Two WordPress installations: One in root and one in sub directory – no images in subdir installation [closed]
- Redirect user to original url after login?
- User redirect to specific URL after logging in
- What is the most efficient (ie. less server intensive) way for 301 redirects?
- A WordPress site with more than one domain name / Parked domains
- Redirect user if they are not logged in
- BuddyPress – Redirects on Login and Logout
- Logout without confirmation and SAME window on mobile
- How to redirect a wrong search on my wordpress website to the error 404 page?
- store URL global before we redirect
- Redirect to page for KPI/marketing purpouses
- Will deleting WP’s code in .htaccess cause problems?
- Migrating to Tumblr [closed]
- Parked domain redirect
- Redirect 301 of old urls to wordpress urls
- How can I redirect a request to the site root using htaccess, if there’s not a specific cookie set?
- How to fix automatic redirects?
- Redirecting DNS without breaking everything
- redirect “about author” code to about page
- get_bloginfo prints IP instead of url
- How to redirect non existent pages/posts in wordpress using htaccess
- redirect doesn’t work while using example code
- How to redirect all page requests to a single “goodbye” homepage? [duplicate]
- redirect second domain to static page
- Endless Redirects Suddenly Disable Site
- Redirecting home to /wp-login.php?action=register
- How to redirect a child page to its parent page?
- 301 redirect after removing language directories
- Redirect to custom login page if not logged in and redirect to home if logged in user try to login, how?
- wp_login_form() redirect same page
- Erase the HTML website and replace it with a WordPress website -301 Redirection
- How to replace the links http to https
- Redirect user after login to prior page through a wp_login hook
- Redirect *.php to path using web.config file
- How can force redirected to login for two or more pages to view or access
- WordPress not linking correctly with .htaccess redirect to subdirectory
- Auto redirect to different web page
- Redirect only PDFs in different folders?
- Login redirects to home page and doesn’t log in
- wp_redirect() not redirecting user to supplied URL
- How to disable WordPress URL autocomplete / recognition?
- using wp_rewrite but keep the original url in the address bar
- Some links keeps redirecting to another domain
- Redirect user on login using extra field value on login form
- Cannot get 301 redirection in htaccess to work (either Redirect or Rewrite)
- Redirect every link that starts with
- login redirect problem – db charset issue?
- Custom login-form redirect
- Link to another website with the same url path
- Redirect to Page after Login (with variable)
- I have cloudflare flexible enabled, How to redirect to https for Nginx server
- Redirecting page 1 to default permalink
- Redirect problem: How to redirect to the original URL after login
- .htaccess not working after page slug change
- can’t handle a redirect
- Login Form Redirection
- Wrong Redirection
- WordPress HTTPS – ‘… better to use HTTP for installation …’
- Rewrite rule for incoming urls
- Hosting the WordPress website on someone else’s web URL
- Detect if request is coming from wordpress conditional statement
- Can I redirect the http request towards an old folder to the homepage using .htaccess file? [closed]
- WordPress Logout Redirect Follow up
- Facebook redirect buton
- How do make WordPress to let alone my static home page?
- how to get my WP site’s IP? [closed]
- Simple function not working on frontend and can’t figure a way to debug it
- Redirected You too Many Times and Homepage Not Loading
- When invalid child page entered, WP redirects to next available page instead of giving Page Not Found
- Redirect non-logged in users to a specific page