I use subdomain on Apache Httpd. But due to high server load, I want to use Lighttpd.
I read below but can't understand much.
STEP 2: Edit your lighttpd.conf file, enable the evhost module,
and append the following, modifying directories as appropriate:
$HTTP["host"] =~ "([^.]+)\.([^.]+)$" {
evhost.path-pattern = "/var/www/%2.%1/html/"
}
# Apply the following drupal rewrite rules to subdomain URLs
# moving subdomain to the 1st argument in the path
# e.g. bob.example.com news.mysite.net
$HTTP["host"] =~ "^([^.]+)\.([^.]+)\.([^.]+)$" {
url.rewrite-final = (
# More than one argument
"^/([^.?]*)\?(.*)$" => "/index.php?q=_%1/$1&$2",
# No arguments
"^/([^.?]*)$" => "/index.php?q=_%1/$1",
)
}
can someone explain what "moving subdomain to the 1st argument in the path" means?
Comments
Comment #1
drupallogic commentedso nobody is willing to help?
Comment #2
molavy2003 commentedi have same problem
just few word for explain what that means?
Comment #3
ecksley commentedI'm no expert in this module or what it says, but I don't think it is asking you to take any action there. I think it is just trying to explaining what it does. A URL alias might be this:
~subdomain/path/after/normal/domain
and might come out like this:
http://subdomain.domain.com/path/after/normal/domain
Comment #4
setvik commentedThe above rewrite rules (or something similar) are necessary for the 1.x branch which uses some funky and convoluted URL rewriting. See lighttpd documentation for url.rewrite-final and evhost for details.
The rewrite rule referenced above takes the somedomain on incoming URL's and moves it to the beginning of the path prefixed with a tilda (e.g. http://subdomain.example.com would be visible to Drupal internally as http://example.com/~subdomain allowing pathauto to work it's magic).
The 1.x branch has some fundamental flaws though (the crazy url rewriting being the main one) and I *highly* recommend using the 2.x branch (alpha, but pretty stable). It's much more robust and doesn't require any funky lighttpd rewrite rules (though you'll still need to implement wildcard subdomains in lighttpd's config).
Comment #5
setvik commentedPlease feel free to reopen if you still have a question regarding the above.