redirect from http to https flew off - .htaccess

I ran into a problem - that the redirect from http to https did not work for a whole day, the site was connected to cpanel - the site worked fine for 10 days - no work was done - as a result, the redirect flew off and then returned on its own
file.htashes - not touched at all
hosting confirmed the problem - but why and because of what did not say that you can look at it in the logs or in cpanel to find out - what is the cause of this problem!

Related

Unwanted URL redirect

Days ago, I've set up a URL 302 redirect, from subdomain.mydomain.com to target_A.com. I did it in AWS route 53 first, then removed it.
More recently, I added a CNAME record in Cloudflare from subdomain.mydomain.com to target_B.com. However, when entering subdomain.mydomain.com in my browser, I still get redirected to target_A.com ...
How is that possible? Somebody else in my team might have set up a redirect from subdomain.mydomain.com to target_A.com using a DNS web service other than AWS or Cloudflare... How do I find it and remove it?
I had a page rule in Cloudflare that was the cause of my redirect (https://support.cloudflare.com/hc/en-us/articles/200172286-How-do-I-perform-URL-forwarding-or-redirects-with-CloudFlare) ...

IIS 7.5 HTTPS Stopped working

This may look like a duplicate, but I can't find anything else to try.
The Wildcard SSL (Only 1 month old) was installed fine and everything was going swimmingly until today I noticed it was redirecting to HTTP. Any attempts to remove HTTP bindings or force to HTTPS have only drawn a server not found.
This is happening for the stock domain and also the subdomains.
Nothing's changed. The server has been restarted during the period prior to the issue, the cert seems fine, it's also apparently fine in the server setup. I did not drag and drop the cert between stores. The Azure endpoint is in place. Firewall is good. Any ideas?

5 characters appearing in URL

I've been having an issue off and on, hard to reproduce, but happening reasonably regularly.
I have static files on Azure blog storage, and here's the setup - a lot of steps to set up, but it works most of the time - I used this blog as my guide:
index.html lives on the "webfiles" container in blob storage
the CDN points to /webfiles
there's a URL rewrite in the CDN setup from / to /index.html
DNS redirects http://example.com to https://www.example.com
DNS for www points to the CDN URL
When I go to http://example.com, 9 times out of 10, it properly redirects to https://www.example.com/ and loads the index.html page. However, sometimes, and it seems to generally be on a clean browser with no history, it'll send me to something with 5 extra characters, like https://www.example.com/VeVPe/ where I get a 404 and a BlobNotFound exception - I have no idea what VeVPe is, and it seems to be different for different sites. I have 5 sites set up like this, and it happens to all of them.
If I remove that 5-letter (always seems to be letters, never numbers, but that could just be coincidence) and hit ENTER, it loads properly and I get index.html, or if I just try http://example.com a second time, it works properly. Just seems to be one time.
I've also seen it happen to other sites in the public - there's a local school where the website sometimes redirects me to http://www.example.com/LNnZS/ and a 404 page - that one seems to be the same thing, but it's not HTTPS, so that seems to eliminate at least some of the possible causes. I don't know who their DNS or hosting providers are, so I don't know if it's specific to Azure or GoDaddy.
This happens on Chrome and Edge on desktop and Safari on iPhone, so it's not a browser or computer issue.
If it helps, here's what the URL redirect and rewrite look like on Azure:
EDIT I'm seeing something interesting when I can catch it in browser tools:
The initial request to http://example.com goes to GoDaddy's IP and returns a 302 Found to Location /KVZQZ/. Then there's a request to http://example.com/KVZQZ/ which is returned by GoDaddy's IP with a 301 with a Location https://www.example.com/KVZQZ/, and the third request actually makes it to Azure's IP which returns the 404 for BlobNotFound.
So to me, this looks like it's a DNS problem, not a problem with Azure. My DNS settings are:
A # Forwarded to https://www.example.com
CNAME www example.azureedge.net
On the forwarding section of the DNS setup, it just forward to https://www.example.com with a 301 forward type. So from what I can tell, nothing too funky here.
After a lot of Googling - This forum post shows lots of people who have had the same problem where 5-letter codes get added to their site. It's apparently specific to GoDaddy and no one has been able to convince them to address it. Their workaround is to throw a query string on the forwarding address.
I changed the forwarding address from https://www.example.com to https://www.example.com? and it's working ok now.
I made a request in the browser to http://example.com and it redirected me to https://www.example.com/?/MKSTc/ and loaded up the index.html page - obviously this is not ideal because it's ugly, but I suppose I can write some javascript to do a second redirect back to https://www.example.com/

Force a redirect with Cloudflare on a GitLab hosted website?

I have a site hosted on GitLab pages and using Cloudflare to manage the domain DNS, when I try to access the site using mysite.com it returns the website like it should, but when I enter www.mysite.com it returns an error 404 page from GitLab something like this GitLab error 404 page
I have tried to create page rules on Cloudflare but it's doesn't seem to have resolved the problem (yet), It's been over 10 hours, I have no idea how long this should take or if I am doing the right thing in the first place.

Mod rewrite only working on some computers

I've got a website where on the majority of computers it works absolutely fine, redirecting users to the correct pages using the .htaccess file.
However, some computers seem to be ignoring the rules in the .htaccess file (maybe even the .htaccess file completely).
RewriteEngine On
RewriteBase /
RewriteRule ^procyon$ /procyon.php [L]
When a user visits http://www.blackroc-technology.com/procyon it redirects them to a product page. However, for some users they get a 404 error.
Someone in the same building as me (same internet connection) is suffering from this problem - I've tried both IE and Chrome and neither work so it doesn't appear to be a browser issue.
There's also a handful of customers on other internet connections to ours which have reported the problem.
Any thoughts on this? It's seems very odd to me and hard to debug!
If you can reproduce both cases, working and not working, then do an client side HTTP capture, e.g. using Fiddler.
You can then diff the successful/unsuccessful request to try to narrow down the issue e.g. if bad requests always fail and good requests always succeed, when re-requested from Fiddler, regardless of which network, computer they are issued, then it is likely a server side issue (.htaccess or httpd.conf setting sensitive to one of the request attributes).
At the very least you will have a better idea of exactly what is transpiring vs just the end result of a 404.
You can also similarly enable logging on the server side (ideally in a staging enviroment, not production) e.g
RewriteLogLevel 9
to get more details on why bad requests result in a 404

Resources