1

I have foo/bar.txt which should be 403 and I also have foo-hashed/hash/bar.txt which is a symlink to foo/bar.txt and should be accessible. foo/.htaccess contains

Order deny,allow
Deny from all

which is all good but I can't get the hashed file to be accessible. I tried all sorts of variants of Options FollowSymLinks in foo, in foo-hashed without much success.

2
  • AllowOverride All or AllowOverride None?
    – AntonMZ
    Commented Jun 8, 2015 at 10:28
  • AllowOverride All.
    – chx
    Commented Jun 8, 2015 at 18:08

1 Answer 1

0

This is foo/.htaccess

Order Deny,Allow
Deny from All
Allow from env=symlink

This is foo-hashed/.htaccess

SetEnv symlink=1

Edit: this is a working solution.

3
  • Please use the edit link on your question to add additional information. The Post Answer button should be used only for complete answers to the question.
    – kasperd
    Commented Jun 9, 2015 at 21:06
  • This is the complete answer.
    – chx
    Commented Jun 9, 2015 at 21:10
  • This seems needlessly convoluted. Deny from all in the root - and Options FollowSymLinks, Allow from all in the foo-hashed folder.
    – AD7six
    Commented Jun 9, 2015 at 21:45

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .