开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜