subdir / symlinks having htaccess authorization get 404?
-
In another thread i resolved an issue about symbolic links getting eaten by wordpress by adding:
RewriteCond %{REQUEST_FILENAME} !-l
to the existing conditions:
RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d
generated for the site root .htaccess by wordpress.
The situation is only halfway resolved, because for regular symbolic links this indeed works, but if the symlink links to a folder that has its own htaccess that employs authentication, the conditional statement fails.
This occurs not only with symlinks, but also with a real subdirectory is protected by htaccess auth. Means that the authentication is making real folders, and thus symbolic links to those folders fail the above rewrite conditions.
Is there a workaround to beat this situation? Obviously quite beyond the scope of just wordpress, this is advanced htaccess voodoo.
here are two examples I’ve created:
NOTE: subdir/ is a real sub directory in the site root
regular-symlink/ links (correctly) to subdir/regular/ folder, and restricted-symlink/ links to subdir/restricted/ folder where i have implemented some .htaccess authentication mechanism. As you can see with the restricted-symlink/ as well as the real folder subdir/restricted/ it gets eaten by wordpress and spit out by the wp 404 not found page. This means it must have slipped through the Rewrite Condition failing to show up as a real directory/link.Edit: modified the thread title to correctly represent the thread body and question.
- The topic ‘subdir / symlinks having htaccess authorization get 404?’ is closed to new replies.