This is not for WordPress! If you want a way of redirecting if a url contains a directory then take a look here.
If my website had a directory called dogs (/dogs/) in the URL, and I had 100 pages like this: –
http://aq.gthex.co.uk:10000/dogs/page1/
http://aq.gthex.co.uk:10000/dogs/page2/
http://aq.gthex.co.uk:10000/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.
Place this code in the .htaccess file in your root directory.
1 2 3 4 5 |
RewriteEngine on RewriteCond %{REQUEST_URI} /dogs/ RewriteRule .* / |