I have a directory full of email forms in various subdirectories, linked by various people in various places. I recently found a security problem in some of the forms, and I've taken them all offline, but now when people go to the li开发者_C百科nks they get 404 errors. Is there an easy way, with .htaccess perhaps, to redirect any request for mydomain.com/mydirectory/* to mydomain.com/outofservice.html?
This is absolutely possible with .htaccess.
RewriteEngine On
RewriteBase /
RewriteRule ^mydirectory.*$ /outofservice.html [R]
精彩评论