开发者

Redirect all links below a subdirectory to a "out of service" page?

开发者 https://www.devze.com 2023-01-14 07:07 出处:网络
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,

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]
0

精彩评论

暂无评论...
验证码 换一张
取 消