Web Server Configuration
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsWeb DesignWeb Server Configuration

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old January 16th, 2005, 04:01 AM
Charles Charles is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2005
Posts: 1 Charles User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
trouble using .htaccess to control access to files

I am wanting to control how files are accessed in one of my folders. I want to be able to access www.mysite.com/cgi-bin/program.cgi but only from www.mysite.com/admin/index.html
I don't want to allow access directly by typing in the URL but how you can only access it if you are coming from www.mysite.com/admin/index.html

I have more than one files in the same directly that I want to do that to but with different ext.
Here is what I have tried so far but I don't think that it is all correct.

Code:
<FilesMatch "^prog\.cgi$">
   SetEnvIfNoCase Referer "^https://mysite.com/admin/index.html" good_referer=1
order allow,deny
deny from all
allow from env=1
</FilesMatch>

<FilesMatch "^anotherprog\.pl$">
   SetEnvIfNoCase Referer "^https://mysite\.com/admin/index.html" good_referer2=2
order allow,deny
deny from all
allow from env=good_referer2
</FilesMatch>


Also my setup
Apache 2.0.52
PHP 4.3.10
Perl 5.8.1

I do have Allowoverride to All in the httpd.conf file for the cgi-bin. I don't know if using the Referer is the best way to go or if I should use the URI instead of the Referer.

Thank You,
Charles

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsWeb DesignWeb Server Configuration > trouble using .htaccess to control access to files


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


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





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway
Stay green...Green IT