Below is a stripped down example that illustrates the problem. If I
go to http://example.com/webpy_bug_report/ it works fine. If I go to
http://example.com/webpy_bug_report/redirect/ I expect to be
redirected to http://example.com/webpy_bug_report/ but instead I am
redirected to http://example.com/webpy_bug_report/redirect_problem.py/.
I've tried this under plain CGI as well as FastCGI.
Upon further testing, I realized my current fix doesn't quite work.
If this is indeed a bug, I'd be happy to take another try at fixing
it. However, it seems like this would have come up for others
before. I couldn't find anything in the list archives or the issue
tracker. If I'm doing something wrong or if I missed a solution
online somewhere, I'd be most grateful if somebody could point me in
the right direction.
Thanks,
Alex
___________________________________________________________
# .htaccess
RewriteEngine on
RewriteBase /webpy_bug_report/
RewriteCond %{REQUEST_URI} !^/webpy_bug_report/favicon.ico$
RewriteCond %{REQUEST_URI} !^(/.*)+redirect_problem.py/
RewriteRule ^(.*)$ redirect_problem.py/$1 [PT]
___________________________________________________________
# redirect_problem.py
import web
urls = (
'/', 'index',
'/redirect/','redirect'
)
class index:
def GET(self):
return "This is the index page."
class redirect:
def GET(self):
raise web.seeother('/')
app = web.application(urls, globals())
if __name__ == '__main__':
app.run()
--
You received this message because you are subscribed to the Google Groups
"web.py" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/webpy?hl=en.