I am trying to redirect any and all requests to a certain directory, even if the requests include arguments. For instance, I see that Google is listing a couple old links from an old blog as 404, but the links look like: example.com/stuff/?args .. So I feel like I need to redirect any request that goes to /stuff/ and also strip the args since they will produce their own 404’s if they are left on.
Any help would be greatly appreciated.
Thanks.
Enable mod_rewrite and .htaccess through
httpd.confand then put this code in your.htaccessunderDOCUMENT_ROOTdirectory: