-1

On my server http is installed Nginx version: 1.2.7

Today I turned on SSL.

But I have a big problem, i do not know how to set the absolute all subpages diverted permanently to: https://example.com

So I want all this:

  • http://example.com
  • http://www.example.com

to be redirected to https://example.com

  • http://www.example.com/test.pdf to be redirected to https://example.com/test.pdf

Like all subpages (I have 500 sub pages 200 html – 300 pdf).

On my https installed Apache.

Also how to configure everything, because I have very little knowledge.

  • Possible duplicate of [Redirecting to SSL using nginx](http://stackoverflow.com/questions/18523180/redirecting-to-ssl-using-nginx). – jww Aug 18 '14 at 23:22

1 Answers1

0

try this: return 301 https://example.com$request_uri;

itpp13
  • 444
  • 2
  • 6