Redirect http to https?

Status
Not open for further replies.

CM30

Gaming Latest Admin and Gaming Reinvented Owner
Full GL Member
13,107
2010
984
Awards
7
Credits
506
Site runs on a nginx server (previously apache) so htaccess wouldn't work.

Redirects are already in place. Clear your browser cache and it should work.
 
I do have a .htaccess rule in place. What are you doing that it comes up as none s?

Users may be typing forum thread links as http:// instead of https:// , or backspacing the s from https which can bring up a 404 error .

Some CMS and blog/forum editors may use HTTP as the default protocol for links, so links which link to http versions of Gaming Latest forum topics will reach a 404 error page.

http://gaminglatest.com/threads/redirect-http-to-https.99925/ will bring up a 404 Not Found error page until the user add a S to the end of the http protocol text which makes it https , so the link goes to Redirect http to https?
 
Users may be typing forum thread links as http:// instead of https:// , or backspacing the s from https which can bring up a 404 error .

Some CMS and blog/forum editors may use HTTP as the default protocol for links, so links which link to http versions of Gaming Latest forum topics will reach a 404 error page.

http://gaminglatest.com/threads/redirect-http-to-https.99925/ will bring up a 404 Not Found error page until the user add a S to the end of the http protocol text which makes it https , so the link goes to Redirect http to https?

who still types the http part in these days? Anyways, both links work for me on fire/waterfox.
 
who still types the http part in these days? Anyways, both links work for me on fire/waterfox.

The number of people who type http part is getting smaller, but there may still be a few people who type http:// and https:// because some alternative more basic mobile web browser searches google if you don't type the http part.

I notice I get 404 Not found errors when I remove the s from http on forum threads like http://gaminglatest.com/threads/redirect-http-to-https.99925/ when I use Google Chrome, and other web browsers. But, the https version at Redirect http to https? works fine.
 
The number of people who type http part is getting smaller, but there may still be a few people who type http:// and https:// because some alternative more basic mobile web browser searches google if you don't type the http part.

I notice I get 404 Not found errors when I remove the s from http on forum threads like http://gaminglatest.com/threads/redirect-http-to-https.99925/ when I use Google Chrome, and other web browsers. But, the https version at Redirect http to https? works fine.

even with the s gone, still works for me. odd.
 
Sounds like a bad configuration to me.
This is how I do it on my server:
Code:
server {
        listen          80;
        server_name     076.wtf www.076.wtf;
        rewrite ^(.*) https://www.076.wtf$1 permanent;
}

server {
        listen       443;

        ssl on;
        ssl_certificate         /crt/076.wtf.crt;
        ssl_certificate_key     /crt/076.wtf.key;

        server_name  076.wtf www.076.wtf;

        root   /www/076.wtf;
        index  index.php index.html index.htm;

        location / {
                rewrite ^/page/([a-z-]+)$ /index.php?mode=page&slug=$1 last;

                try_files $uri $uri/ =404;
        }

    location ~^(/page/).*(\.php)$ {
                try_files $uri $uri/ /index.php;
        }

    error_page 404 /404.html;
        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
                root   /usr/share/nginx/html;
        }

    location ~ \.php$ {
                try_files $uri =404;
                fastcgi_split_path_info ^(.+\.php)(/.+)$;
                fastcgi_pass php-fpm;
                fastcgi_index index.php;
                fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                include fastcgi_params;
        }
}

You do not want to literally copy the part I make nice URLs, since that one is specific to my self-developed CMS system.
 
I get

404 Not Found

nginx

When I remove the s from https and visit http://gaminglatest.com/threads/redirect-http-to-https.99925/ . But, I notice it does not happen all the time for me on web browsers like Chrome, Firefox, IE/Edge, etc, and sometimes it redirects to the https link for the topic.
If you use a browser with an incognito mode that doesn't save cache, it shouldn't happen. Or you can try clearing your cache.

テクニカル諏訪子 SuwakoMoriya Bad configurations result in nginx not starting ;)
 
In this particular case, I meant "bad configuration" in the sense of "it works, but not the way you want it to", not "it broke".
But it does work the way we want it to. It's a client-side issue (only happens in some browsers with cached data) and requires clearing cache.
 
If you use a browser with an incognito mode that doesn't save cache, it shouldn't happen. Or you can try clearing your cache.

I get the same 404 error when going to non-https http links for gaming latest forum topic links on both Incognito/Private browser windows, and regular browser windows for Chrome, IE, and Firefox.

I get the same result of a 404 error when I either click on an link for Gaming Latest which uses http or I remove the S from the https link for Gaminglatest topic links.
 
Just tried again the HTTP link Froggy linked to.

Results (all on Linux, and all 64-bit):
Chromium 60.0.3112.101 (dev): works.
qutebrowser 0.11.0: works.
Firefox 55.0.2: works.
Chrome62.0.3192.0 (dev): works.
 
HTTP links GamingLatest topics are redirecting to the HTTPS link for the topic when I click Redirect http to https? . I no longer get the 404 error when I click on http link for gaming latest topic links.
 
Status
Not open for further replies.
Back
Top