Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Security - PHP Nuke
Author Message
DaveTomneyUK
Hangin' Around


Joined: Sep 27, 2003
Posts: 49

PostPosted: Sun Mar 06, 2005 8:11 am Reply with quote

Hi,

I am trying to protect 3 of my .PHP files using .HTACCESS but if I use the below line it wont work.

Code:


<files ~ "\.(file1.php|file2.php|file3.php)$">
   deny from all
</files>


But if I add the lines like this below they work but dont you think it looks a bit of a waste of code?

Code:


<files ~ "\file1.php$">
   deny from all
</files>

<files ~ "\file2.php$">
   deny from all
</files>

<files ~ "\file3.php$">
   deny from all
</files>


Any ideas?

_________________
Image
Only registered users can see links on this board! Get registered or login! - Only registered users can see links on this board! Get registered or login! - Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 17077

PostPosted: Sun Mar 06, 2005 8:41 am Reply with quote

Did you try
Code:
<files ~ "\.(file1.php$|file2.php$|file3.php$)"> 

   deny from all
</files>
 
View user's profile Send private message
DaveTomneyUK
PostPosted: Sun Mar 06, 2005 8:51 am Reply with quote

nope i'll try it... didn't work it just puts a blank page if i goto the files.
 
DaveTomneyUK
PostPosted: Tue Mar 08, 2005 5:17 am Reply with quote

Sorted it out this worked.

Code:


<files ~ "^(file1.php|file2.php|file3.php)$">
   deny from all
</files>


Very Happy
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Security - PHP Nuke

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©