Day: March 2, 2018
htaccess redirect to https may cause redirect to 401.shtml when using password protection
When using the .htaccess for password protection in combination with the .htaccess 301 redirect to https in Really Simple SSL, a redirect to https://domain.com/401.shtml might occur. A simple solution that has been reported to work is to add ErrorDocument 401 default To the top of your .htaccess, so the end result looks like this (the error document should come before the password lines): # Error Document ErrorDocument 401 default #password protection AuthType Basic AuthName “YOUR AUTH NAME” AuthUserFile “/path/to/file” require
Leon Wimmenhoeve
March 2, 2018