Here is my index.py:
--------------------------------
#!/usr/bin/env python
import web

render = web.template.render('templates/')

urls = (
    "/", "index",  #  Does not work, I have to remove the slash or use "/?"
    "/test", "test",  #  Does not work AT ALL, returns 404.
)

class index:
    def GET(self):
        return render.index(self)
class test:
def GET(self):
return "Test Passed!"
web.wsgi.runwsgi = lambda func, addr=None: web.wsgi.runfcgi(func, addr)
if __name__ == "__main__":
    app = web.application(urls, globals())
    app.run()
------------------------------------------

My "/" url will not work, I have to remove the slash, so if I set it to "", 
"index"  that will render the index.  Also, my "/test" URL returns a 404 
error instead of returning "test passed!".  I have web.py and this module 
in a subfolder on my domain, and I have a .htaccess in that folder as well.

Here is my .htaccess:
-----------------------------------------
Options +ExecCGI +FollowSymLinks
Order allow,deny
Allow from all
AddHandler fcgid-script .py .php   # I have to use fcgid-script for fastcgi 
on hostgator
<IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_URI} !^/icons
    RewriteCond %{REQUEST_URI} !^/favicon.ico$
    RewriteCond %{REQUEST_URI} !^(/.*)+index.py/
    RewriteRule ^(.*)$ index.py/$1 [PT]
</IfModule>
----------------------------------------------

Because this does not work, I also cannot pass URL parameters on to the 
templates as variables.

Any help would be greatly appreciated!

-- 
You received this message because you are subscribed to the Google Groups 
"web.py" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/webpy.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to