A project I'm currently working on has a sort of proxy functionality where users can browse to another URL through the site. I was hoping the URL could be something like this:
www.mydomain.com/browser/[URL here]
However I'm having trouble capturing a URL as a parameter like this. I think my inexperience with regex is failing me here :( My URL conf looks like this:
urlpatterns += patterns('',
url(r'^browser/(?P<url>\w+)/$', browser_proxy, name='browser_proxy'),
)
I'm thinking the \w+
isn't sufficient to capture an arbitrary URL. Anyone know what I should be using here to capture a URL as a parameter like this?
Thanks for any help.