How to redirect all pages in /directory/ to webpage with htaccess

by Malice Ratatosk   Last Updated May 15, 2018 19:04 PM

I am trying to redirect all pages on my site in one directory to a specific page using htaccess.

Example anything like example.com/forums/ example.com/forums/pages example.com/forums/subdirectory/ example.com/forums/subdirectory/page.html

basically anything in /forums/ to only

example.com/groups/subdirectory/

It would be a permanent change. Basically, I bought a new domain from an auction that I migrated my site to and I am getting a lot of 404s from links to whoever was previously on this domain.

Thanks!



Related Questions



redirecting https to http

Updated October 21, 2015 09:01 AM

Does it make sense to throw a 404 error with PHP?

Updated March 10, 2016 07:01 AM

Would you recommend a 301, 302 or something else?

Updated April 25, 2015 21:01 PM