Freeman
Freeman

Reputation: 1190

https:// link goes to :443 by itself

I have a few links in my page. When I open the page in http://, it works just fine (correctly goes to http://www.example.com/path/to/page. But when opened in https://, when I click on the link, it brings me to www.example.com:443/path/to/page instead, and it gives me a 400 error:

Bad Request

Your browser sent a request that this server could not understand.
Reason: You're speaking plain HTTP to an SSL-enabled server port.
Instead use the HTTPS scheme to access this URL, please.

I'm sure my link targets are fine (I use relative paths). How can I tackle this issue?

Upvotes: 1

Views: 1593

Answers (2)

Gaurav Arora
Gaurav Arora

Reputation: 1815

Default port for HTTPS is 443, because of which all calls to HTTP will route to http:/XYZ:443/ by default. If you want to access the url via https, you'd need to enable/setup https in your webserver.

If you are using apache, try this link: http://docs.oracle.com/cd/A95431_01/install/ssl.htm

Upvotes: 2

hakki
hakki

Reputation: 6519

Have you got SSL certificate four your domain or localhost?

"You're speaking plain HTTP to an SSL-enabled server port." Try to change your SSL settings.

Upvotes: 1

Related Questions