LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 04-27-2008, 06:40 PM   #1
pxshock
LQ Newbie
 
Registered: Apr 2008
Posts: 1

Rep: Reputation: 0
.htaccess how to require authn for all files ina folder, besids certain file extentns


.htaccess how to require authn for all files ina folder, besids certain file extentns

.htaccess, how to require authentication for files in a folder, besides certian file extentions?

hey guys, been trying this for about 24 hours now, and im just really beat..

im using apache2, and i been to a couple sites such as the apache doc site, and no help at all(as in nothing i try works). What i want to do is, require authencation for all files in a directory execpt certain files with a particular extention, allowing all files but some extentions.

so im attempting to add restriction for all files, and then trying to single out files with a particular extention and remove the require clause...not working though

i have a folder with some jpgs in it, and some folders with other files, and also jpgs, i will be linking those jpgs from other sites, so i need then to not require authentication, however, all the other files in the doc root i need to set authentication for.

this is what i have so far.

<Directory /home/www/shared/>

<Files *>
AuthType Basic
AuthName "This is a restriced site"
AuthUserFile /pass/a
AuthGroupFile /pass/g
Require group GroupName
</Files>


#also tried saying overide none and placing the below in a .htaccess fle in the root dir
<FilesMatch "\.jpg$">
#<Files ~ "\.(jpg)$">
#<Files *.jpg>
Satisfy any
#Require none #i dont think this call (none) even exists, but i still tried it.
#Order deny,allow
Allow from all
#</Files>
</FilesMatch>


#some other config info here

</Directory>

can some please help me, or perhaps suggest a link, or a better solution to my problem

thankx in advance.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Utility Needed - list folder tree and files in text file Optiker Linux - Software 21 11-17-2006 02:46 PM
.htaccess show index files from a folder spank Linux - General 1 05-31-2006 03:29 PM
making a script that will move a file or files in a trash folder Paxmaster Programming 5 12-12-2004 06:00 PM
I have 8 character file name, no extension files being created in my dbaseIII+ folder bonzo Linux - General 2 01-22-2004 06:49 AM
How to display multiple bmps one after the other ina window frmhero2zero Programming 2 10-04-2002 10:56 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 05:12 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration