Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

How I can redirect all SSL requests to "https" folder? My frontend webserver is nginx.

For example:

https: //website.com/checkout.php should be redirected to https://website.com/https/checkout.php

Please help me with this question.

share|improve this question

2 Answers 2

location / {
    rewrite ^ https://website.com/https$request_uri permanent;
}

location /https {
    // Whatever you normally do
}
share|improve this answer

in the server {} block

rewrite ^/checkout.php$  https://website.com/https/checkout.php permanent;
share|improve this answer
    
No, for all pages, not checkout only. –  Aleksey Dec 2 '10 at 15:30

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.