...

View Full Version : Valid URL characters?



cyphix
11-07-2004, 12:38 PM
What characters are ok to use in file extensions on the web?

Cheers!

chilipie
11-07-2004, 03:06 PM
Letters (a-z and A-Z), numbers (0-9), underscores (_), hyphens (-) and fullstops (.) - I think.

cyphix
11-07-2004, 03:45 PM
I'm pretty sure I've seen () used too.....

So it's valid if i use something like... "123........html" for example? Or did you just mean the fullstops between the .com & such?

liorean
11-07-2004, 03:46 PM
The URI standard, RFC 2396, <http://www.ietf.org/rfc/rfc2396.txt>.
The URL standard, RFC 1738, <http://www.ietf.org/rfc/rfc1738.txt>.



; URL schemeparts for ip based protocols:

ip-schemepart = "//" login [ "/" urlpath ]

login = [ user [ ":" password ] "@" ] hostport
hostport = host [ ":" port ]
host = hostname | hostnumber
hostname = *[ domainlabel "." ] toplabel
domainlabel = alphadigit | alphadigit *[ alphadigit | "-" ] alphadigit
toplabel = alpha | alpha *[ alphadigit | "-" ] alphadigit
alphadigit = alpha | digit
hostnumber = digits "." digits "." digits "." digits
port = digits
user = *[ uchar | ";" | "?" | "&" | "=" ]
password = *[ uchar | ";" | "?" | "&" | "=" ]
urlpath = *xchar ; depends on protocol see section 3.1


; HTTP

httpurl = "http://" hostport [ "/" hpath [ "?" search ]]
hpath = hsegment *[ "/" hsegment ]
hsegment = *[ uchar | ";" | ":" | "@" | "&" | "=" ]
search = *[ uchar | ";" | ":" | "@" | "&" | "=" ]


; Miscellaneous definitions

lowalpha = "a" | "b" | "c" | "d" | "e" | "f" | "g" | "h" |
"i" | "j" | "k" | "l" | "m" | "n" | "o" | "p" |
"q" | "r" | "s" | "t" | "u" | "v" | "w" | "x" |
"y" | "z"
hialpha = "A" | "B" | "C" | "D" | "E" | "F" | "G" | "H" | "I" |
"J" | "K" | "L" | "M" | "N" | "O" | "P" | "Q" | "R" |
"S" | "T" | "U" | "V" | "W" | "X" | "Y" | "Z"

alpha = lowalpha | hialpha
digit = "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" |
"8" | "9"
safe = "$" | "-" | "_" | "." | "+"
extra = "!" | "*" | "'" | "(" | ")" | ","
national = "{" | "}" | "|" | "\" | "^" | "~" | "[" | "]" | "`"
punctuation = "<" | ">" | "#" | "%" | <">


reserved = ";" | "/" | "?" | ":" | "@" | "&" | "="
hex = digit | "A" | "B" | "C" | "D" | "E" | "F" |
"a" | "b" | "c" | "d" | "e" | "f"
escape = "%" hex hex

unreserved = alpha | digit | safe | extra
uchar = unreserved | escape
xchar = unreserved | reserved | escape
digits = 1*digit

cyphix
11-07-2004, 04:45 PM
Thanks for the info liorean! :thumbsup:



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum