Python URL parameters
问题 I'm trying to build a simple URL shortener in Python. Save the URLs is easy using a GET request (with the cgi.FieldStorage() method), something like: http://example.com/shortener.py?url=http://otherwebsite.com/ But how could I get the entire URL when someone try to access the shortened address? Like: http://example.com/urlcode I need to deal with the URL as a string and extract only the "urlcode" after the slash. Edit: I believe that the question was not explained very well. The problem is