-
AuthorPosts
-
January 15, 2016 at 9:33 pm #566323
Hello,
we are running a wordpress site with Enfold and in a subdir a forum. Once we try to protect our forum with an authentication via htaccess Enfold/Wordpress jumps in with a 404-message. How can I avoid this?This is the code I used for the htaccess authentication:
AuthType Basic
AuthName “My Protected Area”
AuthUserFile /home/xxxx/public_html/xxx/.htpasswd
Require valid-userJanuary 18, 2016 at 5:56 am #566921Hi KVSchneppenheim!
Thank you for using Enfold.
There’s nothing wrong with the code but maybe the .htpasswd directory and format is not correct. Please refer to this link for more info: http://www.htaccesstools.com/htaccess-faq/#makeHtaccessWin
Regards,
IsmaelJanuary 18, 2016 at 1:25 pm #567194Hello,
I am convinced that the path and format is correctly (we used the FULL path for the htpasswd). I pasted the .htaccess into the private section below.January 18, 2016 at 1:26 pm #567197By the way if we change the url structure from post name to something else it will work, so I guess it’s a conflict with the rewriting tool or something, but I wouldn’t know how to fix this.
January 18, 2016 at 1:32 pm #567200After googling a lot I experienced that these two lines allowed me to enter the path and enter the htaccess authentication:
#next two lines allow password protected directories with 404 errors
ErrorDocument 401 ./error.html
ErrorDocument 403 ./error.html
#Anyways is this the right way to fix my issue ?
January 19, 2016 at 10:26 pm #568183Hi!
if it does work for you with these two lines, then yes it might fix your issue. Though it’s not a theme related issue I think, as you would have same problem with a default WordPress theme I guess. However, thanks for sharing your solution.
Best regards,
Andy -
AuthorPosts
- You must be logged in to reply to this topic.
