奇怪的现象:
-----------------------------------------
输入:http://localhost/adminaaa(包含app名字字串,后面带/或不带/),提示WML下载。
输入:http://localhost/admin(后面不带/),提示WML下载。
输入:http://localhost/admin/(后面带/),正常。
输入http://localhost/aaa(不包含app名字字串),提示:Sorry! Page Not Found!
好奇怪的,可能是我没理解到lighttpd的rewrite和django的机制,实在想不明白。
附:lighttpd.conf中的相关内容:
-----------------------------------------
$HTTP["host"] == "xx.xx.xx.xx" {
server.document-root = "/home/yuanxing/pylogs/"
server.error-handler-404 = "/templates/404.html"
fastcgi.server=(
"/pylogs.fcgi" =>(
"main" =>(
# Use host / port instead of socket for TCP
fastcgi
#"host" => "127.0.0.1",
#"port" => 8000,
"socket" => "/home/xxx/pylogs/pylogs.sock",
"check-local" => "disable",
)
),
)
alias.url = (
# "/media" => "/home/yuanxing/pylogs/media/",
"/admin_media" => "/usr/share/python-support/python-
django/django/contrib/admin/media/",
)
url.rewrite-once = (
"^(/media.*)$" => "$1",
"^(/admin_media.*)$" => "$1",
"^/favicon.ico$" => "/media/favicon.ico",
"^(/.*)$" => "/pylogs.fcgi$1",
)
}
你是获取的SVN中的版本吗?
提示wml下载应该是检测到移动设备访问,能把你的urls.py贴出来看一下吗?
> }- 隐藏被引用文字 -
>
> - 显示引用的文字 -
我一直使用的firefox访问,在访问上面提到的url时,总会提示wml下载。