Laura
Laura

Reputation: 181

AngularJs: Using $locationProvider.html5Mode(true) triggers unexpected http redirect from https

I added the line

$locationProvider.html5Mode(true);

in app.js of my webapp in order to revove the '#' symbol from the URL. Once added this line (even only importing locationProvider) all requests in my site are redirected to http (port 80).

I need to use https, can anyone help me?

Thanks, Laura

Upvotes: 0

Views: 32

Answers (1)

tbone849
tbone849

Reputation: 955

Try and add to the head.

<html>
  <head>
    <base href="/">
  </head>
</html>

You might also want to look into How to redirect HTTP to HTTPS Using .htaccess https://www.google.com/amp/s/www.freecodecamp.org/news/how-to-redirect-http-to-https-using-htaccess/amp/

Upvotes: 0

Related Questions