Software > router & port problems

Redirect from 80 (HTTP) to 443 (HTTPS)?

(1/2) > >>

eyespeak:
Hi,

i have generated with Stunnel and Let´s Encrypt my own certificate without a SSL warning. Nice :-)

Now: how i can redirect alway all requests from port 80 to port 443?

Thanks a lot.

bmartino1:
iptables /nat traffice to via port forwarding starting port 80 to ending pot 443.

or

have a port 80 webpage that redirects you to the https site.

https://stackoverflow.com/questions/5411538/redirect-from-an-html-page

html code:


--- Code: ---<meta http-equiv="refresh" content="0; url=http://example.com/" />
--- End code ---

LeoNeeson:
@eyespeak: I guess you own a domain, right?...
...or you are only using a DynDNS service (like No-IP)?

If you are using a domain, please say us what registrar are you using.
If you can give us more details, it would be more easy to help you. ;)

eyespeak:

--- Quote from: bmartino1 on June 03, 2017, 02:24:56 PM ---
--- Code: ---<meta http-equiv="refresh" content="0; url=http://example.com/" />
--- End code ---

--- End quote ---
Ok, it works but i have now a endless loop between http<>https. Not so good :)

eyespeak:

--- Quote from: LeoNeeson on June 04, 2017, 05:00:53 AM ---@eyespeak: I guess you own a domain, right?...
...or you are only using a DynDNS service (like No-IP)?

--- End quote ---
Yes, own domain with subdomain. I connect with sub.domain.de


--- Quote ---If you are using a domain, please say us what registrar are you using.
--- End quote ---
My router has an account from selfhost.de, and my provider a CNAME entry on this subdomain. It works fine.

But how can I now only connect to https? The only way so far ... Only NAT 443 to internal:
NOT Working http://sub.mydomain.de
Working https://sub.mydomain.de

But I want to redirect from http to https directly:
http to https
https stay https

Navigation

[0] Message Index

[#] Next page

Go to full version