|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
You don't need a fax machine to get faxes. Get a fax-to-email fax number from CallWave. Try it free.
|
|
#1
|
|||
|
|||
|
DirectoryMatch
I would like to create a DirectoryMatch or "Directory ~" directive in my server config which allows any visitor to access a specific file within that directory, but not within it's sub directories.
It should be something like this, but i'm quite novice in regexp .. and it's blocking everything.<DirectoryMatch "/usr/local/apache/htdocs/1/1$"> Order Deny,Allow Deny from All <File index.html> Order Allow,Deny Allow from All </File> </DirectoryMatch> If i only specify the directory without the nuts and bolts the directive will allow access to http://myserver/1/1/index.html, but not to http://myserver/1/1/something.html. Unfortunatelly it will allow access to http://myserver/1/1/1/index.html as well ... |
|
#2
|
|||
|
|||
|
What exact files or directories do you want to allow and disallow access?
You probably should try locationmatch instead -> http://httpd.apache.org/docs/mod/co...l#locationmatch <LocationMatch "^/1/1/?$"> so that http://myserver/1/1/blahblah/index.html doesn't match and allow thru. |
|
#3
|
|||
|
|||
|
actually i only want to allow access to index.html and only under the directory /1/1. So for example /1/2/index.html should not much...
|
|
#4
|
|||
|
|||
|
>> actually i only want to allow access to index.html
Not enough info, please answer the following: 1) How about any other files in /1/1/ dir? 2) How did you set your hyperlink from other pages? like this -> http://www.domain.com/1/1/index.html or this -> http://www.domain.com/1/1 or this -> http://www.domain.com/1/1/ 3) If you allow access only to /1/1/index.html but not /1/1/pic.jpg, do you have any hyperlinks on your /1/1/index.html page at all? If so, link to where? 4) Any subdirs under /1/1/? allow or deny? You need to give more examples so we have a clue what exactly do you want. |
![]() |
| Viewing: Dev Shed Forums > System Administration > Apache Development > DirectoryMatch |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|