Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: How to select a specific file with a path using .htaccess |
|
Author |
|
Dareros
Joined: 14 Jun 2014 Posts: 5
|
Posted: Sat 14 Jun '14 16:29 Post subject: How to select a specific file with a path using .htaccess |
|
|
Hi;
I want to select a specific file by its path using .htaccess to allow access to it. Here is what i have tried.
Code: | <Files "/var/web/site/system.log">
Order Allow,Deny
Allow from all
</Files> |
Code: | <Directory /var/web/site>
<Files "system.log">
Order allow,deny
Allow from all
</Files>
</Directory> |
The first didn't work and second give me a 500 internal error. I must use .htaccess for this task and not httpd.conf because i am using shared hosting which of course didn't allow access to httpd.conf.
Thank you |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
Posted: Sat 14 Jun '14 21:57 Post subject: |
|
|
Are all files denied or why do you need to make that one accessable?
I would use
Code: | <Files "system.log">
Order Allow,Deny
Allow from all
</Files> |
within a .htacces in /var/web/site/ folder |
|
Back to top |
|
|
|
|
|
|