List Info

Thread: 301 puzzlement




301 puzzlement
user name
2006-09-06 03:43:43
I am probably missing something obvious again but here's
something that 
has me puzzled.  I have a CGI program that executes for
every URL 
starting with /akasha.  But if I leave off the trailing
slash, I get a 
redirect to the URL with a /.  Ideally what should happen is
it 
shouldn't matter if there's a trailing slash, it should
just invoke the 
CGI and be done with it.  normally this is not a problem
when accessing 
pages but it is causing problems for CGI.  It would really
be nice to 
not have to remember to add that trailing /

what am I missing?

Directory /akasha {

     Handler cgi {
         ErrorHandler on
         scriptalias /var/www/scripts/default/ak_cgi.cgi

         # point to the akasha modules
         Env PYTHONPATH
"/usr/local/python/akasha"

         # point to the default css file
         Env AKASHA_CSS "/files/akasha.css"

         # base_path is the full pathname to the akasha data
store
         # don't forget the trailing slash
         # note: this path should not be exposed to the
outside world
         Env AKASHA_BASE_PATH
"/home/esj/projects/data-akasha/"

         # make this the same as the script name in
scriptalias
         Env AKASHA_SCRIPT "ak_cgi.cgi"
     }
}

*** ethereal capture.

GET /akasha HTTP/1.1
Host: 192.168.118.16
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US;
rv:1.8.0.6) 
Gecko/20060728 Firefox/1.5.0.6
Accept: 
text/xml,application/xml,application/xhtml+xml,text/html;q=0
.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive



HTTP/1.1 301 Moved Permanently
Connection: Close
Date: Tue, 05 Sep 2006 23:31:20 GMT--5
Server: Cherokee/0.5.4 (UNIX)
Location: /akasha/
Content-Type: text/html
Content-length: 267
Cache-Control: no-cache
Pragma: no-cache
P3P: CP=3DNOI NID CURa OUR NOR UNI


_______________________________________________
Cherokee mailing list
Cherokee0x50.org
http://www.0x50.org/cgi-bin/mailman/listinfo/cherokee
[1]

about | contact  Other archives ( Real Estate discussion Medical topics )