嗅嗅今天发了个问题,apache REDIRECT_URL not set
<LocationMatch “/web/.*\.html”>
Options FollowSymLinks Includes
AllowOverride None
ErrorDocument 404 /detail.jsp
</LocationMatch>
在jsp里面拿不到 REDIRECT_URL 头
一开始我还不知道有这个东西,上去apache查文档。。。
e.g. if a script crashes and produces a “500 Server Error” response, then this response can be replaced with either some friendlier text or by a redirection to another URL (local or external).
- Display some other text, instead of the NCSA hard coded messages, or
- redirect to a local URL, or
- redirect to an external URL.
Redirecting to another URL can be useful, but only if some information can be passed which can then be used to explain and/or log the error/problem more clearly.
To achieve this, Apache will define new CGI-like environment variables, e.g.
REDIRECT_HTTP_ACCEPT=*/*, image/gif, image/x-xbitmap, image/jpeg
REDIRECT_HTTP_USER_AGENT=Mozilla/1.1b2 (X11; I; HP-UX A.09.05 9000/712)
REDIRECT_PATH=.:/bin:/usr/local/bin:/etc
REDIRECT_QUERY_STRING=
REDIRECT_REMOTE_ADDR=121.345.78.123
REDIRECT_REMOTE_HOST=ooh.ahhh.com
REDIRECT_SERVER_NAME=crash.bang.edu
REDIRECT_SERVER_PORT=80
REDIRECT_SERVER_SOFTWARE=Apache/0.8.15
REDIRECT_URL=/cgi-bin/buggy.pl
note the REDIRECT_
prefix.
At least REDIRECT_URL
and REDIRECT_QUERY_STRING
will be passed to the new URL (assuming it’s a cgi-script or a cgi-include). The other variables will exist only if they existed prior to the error/problem. None of these will be set if your ErrorDocument is an external redirect (i.e., anything starting with a scheme name like http:
, even if it refers to the same host as the server).
原来还有这样的东东,对apache的稳定性有信心,那应该就是resin的问题了,mod_caucho经常有各种奇怪的行为,上去resin网站一查。。发现:
3.0.18 – Feb 23, 2006
哈哈,就这样解决了,升级吧。。。。
Leave a Reply