Welcome! Log In Create A New Profile

Advanced

Correct Rewrite?

March 11, 2016 03:12PM
We currently use the following method to perform an http to https rewrite.

rewrite ^ https://$server_name$request_uri permanent;

I am planning to change it to the preferred method of:

return 301 https://$server_name$request_uri;

However, we'd like to also make sure any requests for domain.com are sent to www.domain.com, whether someone tries to access domain.com via http or https.

How would I write the redirect statement to rewrite http:// to https:// but also rewrite domain.com to www.domain.com?
Subject Author Posted

Correct Rewrite?

mevans336 March 11, 2016 03:12PM

Re: Correct Rewrite?

Richard Stanway March 11, 2016 03:30PM

Re: Correct Rewrite?

mevans336 March 13, 2016 07:30AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 42
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready