I'm planning to migrate an old website to django. Initially, I want to use django for the urls www.mydomain.com/news, and continue to use the old static website for everything else.
I have little experience of lighttpd, which my django host uses, so I need some help with the configuration.
For a default django install, the lighttpd configuration is:
# mydomain
$HTTP["host"] =~ "(^|\.)mydomain.com$" {
fastcgi.server = (
"/django.fcgi" => (
"main" => (
"socket" => env.HOME + "/projectname/projectname.sock",
"check-local" => "disable",
)
),
)
alias.url = (
"/media" => env.HOME + "/projectname/media",
)
url.rewrite-once = (
"^(/media.*)$" => "$1",
"^(/.*)$" => "/django.fcgi$1",
)
}
I've changed the line
"^(/.*)$" => "/django.fcgi$1",
to
"^(/news/.*)$" => "/django.fcgi$1",
so that django is only used for urls beginning /news/
, but I don't know how to redirect everything else to the static website folder.