Click here to Skip to main content
15,888,351 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi,

I have a web server set up, and only one specific file should be accessed from the web. Instead of returning a 404 or 403 error if someone tries to access any of the other files, I'd like to refuse the connection so the user doesn't even know the server exists, much like the same error you get if you try to browse to an invalid site.

I've got my RewriteCond set up; how can I refuse the connection?

Thanks

What I have tried:

RewriteEngine On
RewriteCond (whatever)
RewriteRule ^ - [F,L]
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900