Hello guys, how are you? =)
I'm working on hundreds of OLS installations for a managed cloud hosting, and I started to notice a common problem:
If I have the following dir structure, the last .htaccess doesn't get read:
/srv/user/www/.htaccess
/srv/user/www/dir1/.htaccess
/srv/user/www/dir1/dir2/.htaccess
I have to move the dir2/.htaccess content to dir1/.htaccess and change the RewriteBase and RewriteRules to apply any rule to dir2/
I have a Wordpress generated .htaccess on www/.htaccess
Then I have a single rule .htaccess on dir1/.htaccess redirecting all requests to dir1/info.php
And finally I have another single rule .htaccess on dir1/dir2/.htaccess redirecting all requests to dir1/dir2/info.php
When I try to access something on dir1/dir2 in the browser, I got the following log:
2019-07-30 11:37:25.590607 [INFO] RewriteFile [/srv/user/www/.htaccess] parsed, return 0.
2019-07-30 11:37:37.799877 [INFO] RewriteBase [/dir1/] parsed, set to HttpContext 0x266a490.
2019-07-30 11:37:37.800335 [INFO] RewriteFile [/srv/user/www/dir1/.htaccess] parsed, return 0.
OLS is not parsing any .htaccess after the first subdirectory, it seems. Is this a known limitation, or is it a bug?
I'm working on hundreds of OLS installations for a managed cloud hosting, and I started to notice a common problem:
If I have the following dir structure, the last .htaccess doesn't get read:
/srv/user/www/.htaccess
/srv/user/www/dir1/.htaccess
/srv/user/www/dir1/dir2/.htaccess
I have to move the dir2/.htaccess content to dir1/.htaccess and change the RewriteBase and RewriteRules to apply any rule to dir2/
I have a Wordpress generated .htaccess on www/.htaccess
Then I have a single rule .htaccess on dir1/.htaccess redirecting all requests to dir1/info.php
And finally I have another single rule .htaccess on dir1/dir2/.htaccess redirecting all requests to dir1/dir2/info.php
When I try to access something on dir1/dir2 in the browser, I got the following log:
2019-07-30 11:37:25.590607 [INFO] RewriteFile [/srv/user/www/.htaccess] parsed, return 0.
2019-07-30 11:37:37.799877 [INFO] RewriteBase [/dir1/] parsed, set to HttpContext 0x266a490.
2019-07-30 11:37:37.800335 [INFO] RewriteFile [/srv/user/www/dir1/.htaccess] parsed, return 0.
OLS is not parsing any .htaccess after the first subdirectory, it seems. Is this a known limitation, or is it a bug?