P
P
Pepper12021-02-01 10:52:26
Lighttpd
Pepper1, 2021-02-01 10:52:26

How to get a subdomain in LIGHTTPD and pass it through RewriteRule?

How to get a subdomain in the LIGHTTPD server config and pass it through the RewriteRule. The site is located in the same folder, you need an implementation like http://(name).site.ru , but you need to rewrite http://site.ru/(name)/ .

$HTTP["host"] =~ ".*\.сайт.ру" {

    url.rewrite-if-not-file = (
"^(.*)$" => "сайт.ру/index.php?имя=$1",
)}

but, accordingly, such a rule does not work to get the name of the subdomain ....

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question