Stian Søiland
stian at soiland.no
Thu May 20 09:06:12 EDT 2004
On 2004-05-19 21:57:17, Jorey Bump wrote: > I can access it on my Debian Woody production server (apache 1.3.26, > mod_python 2.7.8) like this : > > http://www.example.com/test/hello > > But on my Red Hat 9 server (apache 2.0.40, and mod_python 3.0.1-4), I > need the extension: > > http://www.example.com/test.py/hello The reason why Debian-apache accepts the lack of .py and Redhat don't, is probably since the former will include an apache feature called MultiViews. Try in .htaccess or similar: Options +MultiViews As in my debian default httpd.conf: <Directory "/www/default/htdocs/"> Options Indexes Includes FollowSymLinks MultiViews ExecCGI ... </Directory> This makes apache look up in the directory to find sub-matching names. FOr instance, http://www.somewhere.com/image5 would work if image5.jpg were present - and the file extension of the actual file image5.jpg would be used to select the right MIME-type. Similar, if you have a mod_python script test.py - just test will work fine - unless you have other files that starts with "test". This way, you could hide your implementation details, and "test" could be anything, .py, .html, .php, .cgi or a normal directory. I'm not sure if this fixes issues with index.py though. -- Stian Søiland Work toward win-win situation. Win-lose Trondheim, Norway is where you win and the other lose. http://www.soiland.no/ Lose-lose and lose-win are left as an exercise to the reader. [Limoncelli/Hogan] Og dette er en ekstra linje
|