<Directory> statements no in a .htaccess file
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > Web Servers General Talk > <Directory> statements no in a .htaccess file




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    <Directory> statements no in a .htaccess file  
clint


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
04-14-04 06:36 PM

I've got a small config problem.
I am a normal host client on a linux server running apache 1.3.29.
I want to keep some of my scripts and images protected until I
can get the copyright.  The most simple and efficient way that
I can think of, without imposing passwords or other obvious fumbling
like that, is to set up a directory statement something like this:

SetEnvIfNoCase Referer "www\.mydomain\.com" linked_from_website
<Directory "/home/mydomain/public_html/protecteddir">
order deny,allow
deny from all
allow from env=linked_from_website
</Directory>

If I put those in the apache configuration files and bounced the
server, it would probably work as I wish ... only allow any file
in that directory or below (images, html, javascript, etc) to be
accessed if the referer is an html or shtml file that is not protected
but exists in my domain.  All typed in addresses, links from other
sites
ftp or whatever cannot access those files.

The Problem:  I'm just a user.  I have no access to the apache
configuration
files.  I don't even have a /usr/local/apache directory.  AND
<Directory> statements are not allowed inside of an .htaccess file
which is the ONLY file
that has some control over the server configuration that I can modify.
Isn't that a biaotch!

The Questions:  Does anyone out there know a method by which the
web-hosting
company can set up a file in my home dir that has some control over
the apache configuration, that I can modify and effect changes without
needing to bounce
the server (since that would bug all the others on my system, I
believe) that
will implement that snippet of <Directory> statements?

OR

is there another way to do the equivalent modification without using
some sort of Cpanel hotlink or Password protected directory sort of
thing that does not accomplish what I want?

Please, Make My Day!
Clint





[ Post a follow-up to this message ]



    Re: <Directory> statements no in a .htaccess file  
Klaus Johannes Rusch


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
04-15-04 01:33 PM

clint wrote:
> SetEnvIfNoCase Referer "www\.mydomain\.com" linked_from_website
> <Directory "/home/mydomain/public_html/protecteddir">
>  order deny,allow
>  deny from all
>  allow from env=linked_from_website
> </Directory>
>
> The Problem:  I'm just a user.  I have no access to the apache
> configuration
> files.  I don't even have a /usr/local/apache directory.  AND
> <Directory> statements are not allowed inside of an .htaccess file
> which is the ONLY file
> that has some control over the server configuration that I can modify.

You can simply place the order, deny and allow statements in the
/home/mydomain/public_html/protecteddir/.htaccess file.

PS. Checking the referrer is not a reliable access control mechanism, it
is trivial to generate a request with a faked referrer, and there is
equally a chance that legitimate requests will not have a referrer
because of firewall filtering or browser settings.

--
Klaus Johannes Rusch
KlausRusch@atmedia.net
http://www.atmedia.net/KlausRusch/





[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 12:47 PM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register