Using a Bottle Sehttp://bottlepy.org/docs/dev/routing.html#wildcard-filters
I'd like to accept any url, and then do something with the url.
e.g.
@bottle.route("/<url:path>")
def index(url):
return "Your url is " + url
This is tricky because URLs have slashes in them, and Bottle splits by slashes.
Based on new Bottle (v0.10), use a re filter:
@bottle.route("/<url:re:.+>")
You can do that with old parameters too:
@bottle.route("/:url#.+#")
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With