简体   繁体   中英

How do I display 404 errors instead of 403 errors in godaddy's Apache 1.3?

Apparently Apache 1.3 is used by no one except godaddy by now as I can't seem to find any relevant information for this.

I'd like to use .htaccess files to deny direct access to certain files on my site but without letting attackers know that such a file exists so I'd like to display a 404 "file not found" error instead of a 403 "forbidden" error.

Add following code in .htacess file.

RedirectMatch 404 ".*\/\..*"

it will prohibit access to all files or directories starting with a dot, giving a "404 Not Found" error. with the help of Is there a way to force apache to return 404 instead of 403?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM