Project

General

Profile

[UE] https and mod_rewrite (at-once) redirects to http

Added by tanis 3 months ago

Hi,

It seems I got some how lost in the configuration woods.

I try to achieve url rewrite (at once). It's working for http only, but if I enable ssl, I get redirected from https back to http everytime an expression
from url.rewrite-once is triggered.

What do I miss ? Any advice point me out of these woods would be appreciated. :)

Following my configuration:

lighttpd v1.4.63

# lighttpd.conf
$SERVER["socket"] == ":443" {
  ssl.pemfile = "/usr/local/etc/ssl/cert/domain.pem" 
  ssl.privkey = "/usr/local/etc/ssl/private/domain.pem" 
  ssl.engine  = "enable" 
}

url.rewrite-once = (
  "/search.php"    => "/index.php?route=search/search/&type=simple",
  "/advanced.php" => "/index.php?route=search/search&type=advance",
)

#modules.conf 
server.modules = (
  "mod_openssl",
  "mod_rewrite",
  "mod_access",
  "mod_auth",
  "mod_fastcgi",
)

Replies (3)

RE: https and mod_rewrite (at-once) redirects to http - Added by gstrauss 3 months ago

Nothing in the config you have shared does a redirect. Your index.php is likely generating an incorrect redirect.

Configuration: Debug Variables is linked on the front page of the wiki

RE: https and mod_rewrite (at-once) redirects to http - Added by tanis 3 months ago

Thanks I already suspected that this might by related to the index.php, unfortunately it's not my PHP source, but I guess I have to dig now into that.

Thank you again.

RE: https and mod_rewrite (at-once) redirects to http - Added by tanis 3 months ago

I found the issue, as you mentioned it has been related to the index.php. Thank you again for your time pointing me in the right direction! :-)

    (1-3/3)