HTTPS on OpenCart - How to disable HTTPS on /admin? - .htaccess

Got a website that need to use HTTPS in the frontend, but the HTTPS is causing issues on OpenCart /admin login page. Seems like all styles are disabled when accessing the /admin section through HTTPS. Client wants everyone to access the site through HTTPS, so we have a 301 redirect to the HTTPS version of the site, but this is causing issues with /admin.
Any suggestions?

If your certificate is valid, this shouldn't be an issue in the /admin
My guess is your cert is for yoursite.com and your admin is forcing www to www.yoursite.com (possibly the other way around). Ensure you have the correct URL in your /admin/config.php for the certificate, particularly the HTTPS_SERVER value defined in there. If that doesn't fix it, you'll need to provide a link

Go to admin folder. First Backup config.php Then edit config.php . Make http:// url to https:// .Then save . Now visit admin page , https works without no issue .

Related

Can a URL be rewritten to a subdomain without changing the URL in address bar?

Background
1) I have a php upload script located at http://www.example.com/up/upload.php
2) I have a subdomain cdn1.example.com that is a mirror of www.example.com
3) I want all requests made to http://www.example.com/up/upload.php to redirect to http://cdn1.example.com/up/upload.php
The Problem
My upload.php script relies on cookies to work properly
I can successfully forward all requests made to www. to cdn1. but the URL in the addressbar changes. As a result the cookies are lost because its a different domain. Setting my cookies to the root example.com domain is not an option unfortunately.
The Question
Is it possible in my scenario to have upload.php be served from my cdn1. subdomain but have the users browser think its still coming from www. so that all the cookies are still used? If this is possible is there an example I could try plugging into my server?

How to redirect from http to https with a redirect on IIS

I would like all traffic to my site to use https on IIS.
How do I configure a redirect to do that?
(Note: this will be self answered, as there is no correct answer anywhere on this.)
This blog link supposedly answers this question:
However, no-one so far as been able to get it the answer to work, as you end up with an endless loop of a redirect redirecting to a redirect.
So after working with this and resolving it, here is the correct answer:
Install the Http Redirect Feature if it is not already installed.
Create two sites, not one site. The first site is the insecure site which is bound to http only. Do not bind https on this site.
The second site is your secure site. This is bound to https and your security cert.
On the insecure site, add the http redirect: "Redirect requests to this destination: https://example.com" Select status code of Permanent (301).
Test. Any request to http://example.com will be forwarded to https://example.com.

Site automatically changing links to https

I am having few issue with improper URL redirection.
My site is a MVC https site and I have few footer links which are supposed to be http.
In the layout file, I set the URL to www.example.net but when I click the link, it tries to browse as hhttps://www.example.net. If I add hhttp://www.example.net then it tries to browse as hhttps://http//www.example.net
So, can anyone please suggest if any links in the https site should be https as well? When I debug the code and it doesn't have https settings, the URL redirection works fine but only when I put it in server with https, this issues comes.
Note: I added a extra h infront of http or https to fix the no url rule.

I want to use https in opencart checkout page only, the rest page should have http

I have installed ssl certificate and I want to use https in checkout page only. I have set on the ssl in settings. It's still showing https in all the page.
Please tell me the solution for this.
Thank you!
Opencart by default works with ssl only in checkout pages and when user is logged in, as such the only way for you to have https in all url is to force via .htaccess, the simplest solution if this is the case is to remove the redirection that forces https in .htaccess enable ssl in opencart backend and change the config file site url from http to https, although these are steps you should have taken before, and a simple removal of the right lines in .htaccess should suffice.

redirect https:// to http:// bypassing the "Add Exception" page

For some reasons Google custom search result shows https:// for some of my page links. The only solution for now would be to redirect the https:// links to http:// with htaccess for now until i figure out why search results are showing https://
I want the redirect to bypass the SSL cretificate or "Add Exception" page and redirect to http://
You won't be be able to do this with .htaccess because for the client to get the redirect it will have to have already started the SSL session (and therefore shown the add exception page) The only way around this is to buy a real certificate signed by a trusted CA.
You could also sign up for Cloudflare HTTPS. They offer it free of charge right now. You can then enable SSL on the entire site, and redirect to HTTP, or HTTPS. Your choice. This would prevent the warning from being issued.

Resources