So every web.py tutorial I've seen includes this line:
urls = (
'/', 'index',
)
And then, later on, the index class is defined with a GET function and so on. My problem is, this doesn't work. Using the code above, I get a 404 error. Using the following mapping works:
urls = (
'/.*', 'index',
)
But that's going to catch, at least at first, every single possible URL, and I want only an access to the domain root to be handled by "index." Halp?
Some basic info:
Python 2.6, web.py 0.3, Apache 2.2 with mod_wsgi
Not sure what else would be useful, so if there is something important I can add (the VirtualHost from Apache, maybe?) please ask and I'll add it here.
EDIT: Including my Apache VirtualHost config:
<VirtualHost *:80>
ServerName dd.sp4.us
DocumentRoot /home/steve/www/nov2010/public/
ErrorLog /home/steve/www/nov2010/log/error.log
CustomLog /home/steve/www/nov2010/log/access.log combined
WSGIScriptAlias / /home/steve/www/nov2010/app
Alias /static /home/steve/www/nov2010/public
<Directory /home/steve/www/nov2010/app>
SetHandler wsgi-script
Options ExecCGI
</Directory>
AddType text/html .py
<Location />
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_URI} !^/static
RewriteCond %{REQUEST_URI} !^(/.*)+code.py/
RewriteRule ^(.*)$ code.py/$1 [PT]
</Location>
</VirtualHost>