Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Meh solution in Clear category for URL Normalization by StefanPochmann
import re
def checkio(url):
scheme, _, host, *pathparts = url.lower().split('/')
host = re.sub(':80$', '', host)
path = []
def octet(match):
s = match.group()
c = chr(int(s[1:], 16)).lower()
return c if re.match('[-A-Za-z0-9._~]', c) else s.upper()
for part in pathparts:
if part == '..':
if path:
path.pop()
elif part != '.':
path.append(re.sub('%..', octet, part))
return '/'.join([scheme, '', host] + path)
May 1, 2015