I would like to redirect a specific section of a website from HTTP:// to HTTPS:// using Lighttpd.
I've been looking at this
Lighttpd wiki entry, but the examples don't work the way I want.
I have two requirements:
- No specific domain should be specified in the URL redirection configuration.
- NOT something like this:
"^/(.*)" => "https://www.example.com/secure/"
- NOT something like this:
- The redirection should also be applied to sub-items of the location, i.e.
- http:// hostname/secure => https:// hostname/secure
- http:// hostname/secure/subdir/file.ext => https:// hostname/secure/file.ext
- …
Best Answer
Actually, one of their examples is a near-perfect match to your requirements - just needs tweaked to only work in the secure directory: