0

I'm currently using below code in lighttpd.conf to redirect http to https.

$HTTP["scheme"] == "http" {
    $HTTP["host"] =~ ".*" {
        url.redirect = (".*" => "https://%0$0")
    }
}

However, using above either lighttpd or Magento add `/index.php/ to the end. So http://example.com redirect to https://example.com/index.php/

Can the above code cause this and if not, is there anyway to make it disappear using some additonal rewrites?

0
url.rewrite-once = (
                        "^(/(media|skin|js|downloader|app)/.*)$" => "$0",
                        "^/(.*\.php)" => "$0",
                        ".*\?(.*)" => "/index.php?$1",
                        "^/(.*)" => "/index.php/$1"
                        )

                static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )
                url.access-deny = ( "~", ".inc", ".conf", ".bak", ".xml", ".phtml", ".log", ".ini", "/var" )

Use these.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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