Post by jakehishon » Thu Apr 30, 2020 6:10 am

Hey guys

I am trying to make our website secure with a SSL certificate which I couldn't get working. I used https://www.whynopadlock.com/ to determine i need to force HTTPS in the htaccess file.(my config.php has been updated in public and admin. Also I have enabled SSL in my opencart 2.2.0)

It tells me to add the following to my hcaccess

Code: Select all

RewriteEngine On
RewriteCond %{HTTP_HOST} trademax\.co\.nz [NC]
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.trademax.co.nz/$1 [R,L]


So i add it in here and it looks like this

Code: Select all

#Force non-www:
RewriteEngine On
RewriteCond %{HTTP_HOST} trademax\.co\.nz [NC]
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.trademax.co.nz/$1 [R,L]
RewriteCond %{HTTP_HOST} trademax\.co\.nz [NC]
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.trademax.co.nz/$1 [R,L]
RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$
RewriteCond %{REQUEST_URI} !^/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
RewriteCond %{REQUEST_URI} !^/\.well-known/cpanel-dcv/[0-9a-zA-Z_-]+$
RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/(?:\ Ballot169)?
RewriteRule ^(.*)$ http://trademax.co.nz/$1 [L,R=301]
But now I can't access the website after that so I need to change it back. Does anyone have any idea what I have done wrong?

Thanks

Newbie

Posts

Joined
Wed Apr 29, 2020 5:43 am

Post by jakehishon » Fri May 01, 2020 11:22 am

Bump. Really need help with this!

Newbie

Posts

Joined
Wed Apr 29, 2020 5:43 am

Post by thekrotek » Fri May 01, 2020 12:55 pm

Just google for this. Plenty solutions out there, one of them will suit you.

Professional OpenCart extensions, support and custom work.
Contact me via email or Skype by support@thekrotek.com


User avatar
Expert Member

Posts

Joined
Sun Jul 03, 2016 12:24 am


Post by Alana36 » Sat May 02, 2020 6:45 pm

Did you edit this line: RewriteBase /

If you installed in a sub folder make sure it points to that.

Then again if it's a 403 error then it has to do with your server....and not htaccess. Was it a forbidden 403?

If that's the case, 403 status code indicates that the client cannot access the requested resource. It means the wrong username and password were sent in the request, or that the permissions on the server do not allow what was being asked.

paymydoctor


Newbie

Posts

Joined
Sat May 02, 2020 6:43 pm

Post by jakehishon » Mon May 04, 2020 5:41 am

Alana36 wrote:
Sat May 02, 2020 6:45 pm
Did you edit this line: RewriteBase /

If you installed in a sub folder make sure it points to that.

Then again if it's a 403 error then it has to do with your server....and not htaccess. Was it a forbidden 403?

If that's the case, 403 status code indicates that the client cannot access the requested resource. It means the wrong username and password were sent in the request, or that the permissions on the server do not allow what was being asked.
Hey Thanks for replying. I didn't do anything on that one. Should i have pasted the code under that instead? I had put it in the "RewriteEngine On
" section

Newbie

Posts

Joined
Wed Apr 29, 2020 5:43 am
Who is online

Users browsing this forum: Semrush [Bot] and 12 guests