Apache Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsSystem AdministrationApache Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
  #1  
Old April 27th, 2008, 06:16 PM
pxshock pxshock is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2008
Posts: 2 pxshock User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 22 m 30 sec
Reputation Power: 0
general - .htaccess how to require authn for all files ina folder, besids certain file extentn

.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 With Quote
  #2  
Old April 28th, 2008, 11:53 AM
jharnois's Avatar
jharnois jharnois is offline
mod_dev_shed
Dev Shed God 19th Plane (14000 - 14499 posts)
 
Join Date: Sep 2002
Location: Atlanta, GA
Posts: 14,124 jharnois User rank is Brigadier General (60000 - 70000 Reputation Level)jharnois User rank is Brigadier General (60000 - 70000 Reputation Level)jharnois User rank is Brigadier General (60000 - 70000 Reputation Level)jharnois User rank is Brigadier General (60000 - 70000 Reputation Level)jharnois User rank is Brigadier General (60000 - 70000 Reputation Level)jharnois User rank is Brigadier General (60000 - 70000 Reputation Level)jharnois User rank is Brigadier General (60000 - 70000 Reputation Level)jharnois User rank is Brigadier General (60000 - 70000 Reputation Level)jharnois User rank is Brigadier General (60000 - 70000 Reputation Level)jharnois User rank is Brigadier General (60000 - 70000 Reputation Level)jharnois User rank is Brigadier General (60000 - 70000 Reputation Level)jharnois User rank is Brigadier General (60000 - 70000 Reputation Level)jharnois User rank is Brigadier General (60000 - 70000 Reputation Level) 
Time spent in forums: 1 Month 1 Week 1 Day 10 h 58 m 38 sec
Reputation Power: 717
Welcome to Dev Shed.

I'm assuming that you can access the website when there's no authentication involved at all, which would mean that the server config, DocumentRoot, and Allow directives are all in place and correct
Code:
/home/www/shared/.htaccess
AuthType Basic
AuthName "This is a restricted website."
AuthUserFile /pass/a
AuthGroupFile /pass/g
Require group GroupName

<FilesMatch "\.jpg$">
  # assumes:
  #  Order deny,allow
  #  Allow from all
  # in parent configuration
  Satisfy Any
</FilesMatch>
__________________
# Jeremy

Explain your problem instead of asking how to do what you decided was the solution.

Reply With Quote
  #3  
Old April 28th, 2008, 02:56 PM
pxshock pxshock is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2008
Posts: 2 pxshock User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 22 m 30 sec
Reputation Power: 0
much thankx for your reply

here is what i did...it seems to work as well, im not sure why it didnt work earlier, all i did was have a nap, and gave the server a kick.


<FilesMatch "\.jpg$">
Satisfy any
Allow from all
</FilesMatch>

both .htaccess, and placing in <directory> seems to work.

thankx once again for your reply...i was so terribly fustrated.

Reply With Quote
Reply

Viewing: Dev Shed ForumsSystem AdministrationApache Development > general - .htaccess how to require authn for all files ina folder, besids certain file extentn


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

 Free IT White Papers!
 
Accelerating Trading Partner Performance
One in five. That's how many partner transactions have at least one error. That is an amazing statistic, particularly given the extraordinary leaps in innovation across the global supply chain during the past two decades. Download this white paper to learn more.

 
Competing on Analytics
This Tech Analysis is designed to help identify characteristics shared by analytics competitors, and includes information about 32 organizations that have made a commitment to quantitative, fact-based analysis.

 
Cost Effective Scaling with Virtualization and Coyote Point Systems
An overview of the industry trend toward virtualization, how server consolidation has increased the importance of application uptime and the steps being taken to integrate load balancing technology with virtualized servers.

 
Five Checkpoints to Implementing IP Telephony
Implementation planning for IP PBX software and IP telephony has become vital as businesses replace discontinued legacy PBX phone systems. This informative whitepaper outlines five "checkpoints" for any implementation plan that will help make IP communications a successful proposition.

 
Hosted Email Security: Staying Ahead of New Threats
In the last two years, email has become a fierce battleground between the nefarious forces of spam and malware, and the heroes of messaging protection. The spam volumes increased alarmingly every month, bringing clever new forms of phishing and virus propagation attacks.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway