In some source code I am writing, I am able to make a request such as:
http://proxy.metaperl.org/index/bitgold-rw1
And have it redirect successfully.
However, I want to remove index
from the URL and have it still
redirect by using the index()
method. I tried renaming index()
to
default()
after reading about
Dispatching,
but it still does not allow me to have a URL like this:
http://proxy.metaperl.org/bitgold-rw1
It tries to find a method named bitgold-rw1
instead of using the
default method to resolve the request, gving me the error:
NotFound: (404, "The path '/bitgold-rw1' was not found.")
The WSGI startup file looks like this:
# -*- python -*-
# core
import os
import sys
# 3rd party
import cherrypy
# local
def full_path(*extra):
return os.path.join(os.path.dirname(__file__), *extra)
sys.path.insert(0, full_path())
import config
import myapp
application = cherrypy.Application(
myapp.Root(),
"/",
config.config)
index
supposed to be mapping to the site with no subs? i.e.stackoverflow.com
as opposed to `stackoverflow.com/questions'? – Petrohttp://proxy.metaperl.org/bitgold-rw1
and it can't find it. I thinkindex
can have optional parms. – SixfooterRoot
class? In particular anything to do with the related methods? That would like help us get an answer. – Petro