Page 1 of 1

.htaccess

Posted: Sat Oct 13, 2018 1:38 am
by leeburgess
OC 3.0.2.0
Default theme

I have enabled password protect in admin folder by adding a .htaccess file.
AuthName "Admin Area"
AuthUserFile "/home/xxxxxx/.htpasswds/public_html/admin/passwd"
AuthType Basic
require valid-user

But when I goto admin URL it says page cannot be found.

How do I resolve please?

Re: .htaccess

Posted: Sat Oct 13, 2018 4:42 am
by EvolveWebHosting
leeburgess wrote:
Sat Oct 13, 2018 1:38 am
OC 3.0.2.0
Default theme

I have enabled password protect in admin folder by adding a .htaccess file.
AuthName "Admin Area"
AuthUserFile "/home/xxxxxx/.htpasswds/public_html/admin/passwd"
AuthType Basic
require valid-user

But when I goto admin URL it says page cannot be found.

How do I resolve please?
There is a .htaccess file included with Opencart (named .htaccess.txt to begin with) that you can add this code to.

The 'AuthName' you entered needs to be the folder name on your server (admin by default) and it's case sensitive.

Re: .htaccess

Posted: Sat Oct 13, 2018 4:42 pm
by leeburgess
Still the same just does a page cannot be found. Is it because I bave redirect on .htaccess in main folder? If so how can I resolve the admin issue?

Re: .htaccess

Posted: Sat Oct 13, 2018 11:34 pm
by EvolveWebHosting
leeburgess wrote:
Sat Oct 13, 2018 4:42 pm
Still the same just does a page cannot be found. Is it because I bave redirect on .htaccess in main folder? If so how can I resolve the admin issue?
It's hard to say for sure when I'm unable to see your setup but this article should help or even your hosting company support team should be able to help you:
https://documentation.cpanel.net/displa ... ry+Privacy

Re: .htaccess

Posted: Sat Oct 13, 2018 11:43 pm
by leeburgess
That's the guide I followed but once I do that the admin folder is not accessible as it shows page cannot be found.

Re: .htaccess

Posted: Sun Oct 14, 2018 8:11 am
by EvolveWebHosting
leeburgess wrote:
Sat Oct 13, 2018 11:43 pm
That's the guide I followed but once I do that the admin folder is not accessible as it shows page cannot be found.
I think your quickest way to resolve it is to contact your hosting provider. Unfortunately, we aren't hosting your site, otherwise we could have had a look at it for you and resolved it already. If you're interested in signing up with us, we can certainly get things setup properly for you.

Re: .htaccess

Posted: Sun Oct 14, 2018 10:26 am
by IP_CAM

Re: .htaccess

Posted: Sun Oct 14, 2018 4:39 pm
by leeburgess
I have done that but then cannot access admin panel at all. Could it be something to do with .htaccess in main directory?

Re: .htaccess

Posted: Sun Oct 14, 2018 6:44 pm
by leeburgess
For anyone with the same issue you have to add
ErrorDocument 401 "Unauthorized"
To .htaccess in main opencart root.