How to create a http page on a https website? - http

I have a website hosted on Azure and SSL-enabled. I have a silly question:
Everything can still be accessed without https (e.g. "http://www.teacherspet.net.au"). How do I force everything except for the home page (which doesn't need login) to go https?
In other words, when people type in "http://www.teacherspet.net.au", it is redirected to "https://www.teacherspet.net.au".

Related

Redirect causing a POST instead of a GET request

I have a Next.js website deployed to AWS Amplify.
To log into this website, the process goes like this:
The user access another app and log in using e-mail and password
This app makes a post request to my website's api passing some user data
My website's api validates the data, generates a cookie and redirects the user to the home page
This process works fine localy in development and even in previously deployed websites that use the same code, but is not working with this new one.
I don't know if I'm reading into it right, but it seems like this new website is fowarding the redirect as a POST request instead of a GET. The image below shows how it should be (left, the correct way) and how it's currently going (right, the wrong way).
To redirect the user to the home page I simply use res.status(302).redirect("/").

Azure App Service won't serve via HTTP

I have an ASP.net MVC app running on Azure App Service ... I've searched for the answer, but have not found it ... my app seems to always force HTTPS redirect, no matter what. All the docs say it should serve content via HTTP by default, but it does not. Most everyone has the opposite problem of needing to redirect HTTP to HTTPS.
I need Azure App Service to do the following:
1) Serve static Default.htm page via HTTP, without redirecting to HTTPS
My app has a custom domain and no SSL for the custom domain. I want the URL http://example.com/Default.htm to serve the static page, not redirect to HTTPS to serve the static page. I will use azurewebsites domain when I want users to be in HTTPS. I want to use my custom domain name to serve a static home page for users arriving at my site.
As far as I can determine, I do not have any app extensions installed (such s https redirect extension), or anything in web.config to force https, or any RequireHTTPS attributes ... can anyone explain why plain old regular boring HTTP doesn't work here?
Thanks

Web forwarding with masking navigating through pages

I have an asp.net VB site I am hosting at home. I have a domain with godaddy (for example lets call it www.mywebsite.com). This is web forwarded with masking to a freeDNS name called mywebsiteMoo:1111 which is in turn forwarded to my IP. As I have web forwarding with masking turned on the user only sees www.mywebsite.com but I am having trouble and I am sure its something daft.
From the first page of my website there are some links to other pages so for example page2.aspx. If I use page2Link.NavigateURL="page2.aspx"I get a 404 error when it tries to navigate there.
Is there something fundamental I am doing wrong?

Same cookie to 2 domain drupal which is One site

I have a Drupal 6.22 webpage. And I have a .de and a .at top level domain. Now the .at domain is an alias of .de. And I want:
I want to use the .at and the .de domain separately, exactly when anybody open my .at/indexp.php, not drop trough the .de domain.
I want to monitoring the incoming users.
So I want to hosting 2 site from 1 server, and I want to have a same login cookie, so anybody log in at .at, and navigating to .de, he keep logged in.
I know, the 2 page with same cantainment is killing the SEO, so thats a new more question.
I tried to solve the "Same Cookie" problem width $cookie_domain, but i can't. As I read, it's just working with 2 different server's 2 different sites.
Without some coding to authenticate the user between both sites, you can't do this.
Technically, browser won't send the cookies to other domains.
If the $cookie_domain is example.com, then www.example.com, extras.example.com will not get the cookies of example.com.
If it's .example.com, all example.com and its sub domains will get the cookies from browser. (note the leading dot before example.com)
You can't send example.com's cookies from another domain. That's why you are seeing you get redirected to Youtube and back to google when you login at a google domain.
You can point both domains to the same domain and it will work without a problem. But users will have to login twice in both sites.
Alternately you can send the user to the other site right after they login.
For an example, when user logs in at example.com, when the login is successful, send the user to the other domain immediately and the other site (example.net for instance) can do the same authentication and send user back to the origin site.
I don't know any module that does this though.

Moving a domain

Hi I am hoping for some advice.
I have just managed to get a .co domain so I wish to point all requests from my .co.nz domain to the .co
I am running IIS7.5
I have created a services site e.g. services.mydomain.co.nz and the website mydomain.co.nz both are running on their own website and app pool.
At the moment I don't want to break any of the web services so I want to keep the services site as services.mydomain.co.nz but I want to automatically redirect website users to the .co domain instead of .co.nz
So far I have added a new host header in IIS and this allows me to hit the website using the .co domain but I can still hit the site using .co.nz
Do I need to create a url rewrite function to help with this?
You can use http redirection in IIS to direct all requests at the old domain to exactly the same path at the new domain.
You want to choose options as I have in this photo:
Include the full base url to the new site, ending at the slash after the domain name. then leave the other options as I have them; this way, any request at the old domain will be sent a 301 "permanent" code to redirect to the new, equivalent page on the new site.
Note that it's important that you do not check the first of those checkboxes under 'Redirect Behavior'; that will make it send all requests to the home page of your site, rather than to the same path url.
This should be on a separate IIS site, by the way.

Resources