htaccess-for-nginx icon indicating copy to clipboard operation
htaccess-for-nginx copied to clipboard

[Question] Does the HTACCESS only works on primary directory?

Open benyaminl opened this issue 2 years ago • 2 comments

Does the htaccess only works on primary directory? not recursive?

benyaminl avatar Apr 30 '22 08:04 benyaminl

Looking at the code, I think the answer is YES.

It doesn't seem to be recursive, in fact looks like explicitly denies subdirs.

This is a bit disappointing as it would be good to have apache-like subdir support (maybe with an optional parameter for depth of search into subdirs).

For my use case, subdirs would be required.

I think it could be fixed but would need a bit of work.

(p.s. I have not tested, just browsed the code)

zeigerpuppy avatar Jul 05 '22 01:07 zeigerpuppy

Looking at the code, I think the answer is YES.

It doesn't seem to be recursive, in fact looks like explicitly denies subdirs.

This is a bit disappointing as it would be good to have apache-like subdir support (maybe with an optional parameter for depth of search into subdirs).

For my use case, subdirs would be required.

I think it could be fixed but would need a bit of work.

(p.s. I have not tested, just browsed the code)

I see. I think it's a compromise between fast and compatibility with htaccess

Thanks for answering. I just want to clear my doubt. When look into the code, I also think same thing, just not sure.

benyaminl avatar Jul 05 '22 01:07 benyaminl

The script does in fact process subdirectories. You can also make incremental changes in subdirectories, overriding directives from parent directories, just like in Apache's implementation.

e404 avatar Dec 07 '22 15:12 e404

thanks for the clarification @e404

zeigerpuppy avatar Dec 08 '22 02:12 zeigerpuppy