Forum Moderators: phranque

Message Too Old, No Replies

block all files but one specific

         

tabheaven

5:04 pm on Mar 9, 2004 (gmt 0)

10+ Year Member



Hi everyone!

I could use some help with a htaccess problem...

I want to deny access to ALL files on the server, but one that everyone should be able to access.
I thought it would be easy, but I can't figure it out..

Any one? :-)

//Mattias

closed

5:42 am on Mar 12, 2004 (gmt 0)

10+ Year Member



Pseudo-code:
If REQUEST_URI is not the file that everyone should be able to access, send out a 403 Forbidden.

woro2006

1:30 pm on Mar 12, 2004 (gmt 0)

10+ Year Member



this is the code in practice, hope it helps.

RewriteCond %{REQUEST_URL}!file.php
RewriteRule .* - [F]

tabheaven

2:22 pm on Mar 12, 2004 (gmt 0)

10+ Year Member



Thanks alot! I will try that alter today when I'm home from work.

//Mattias