sqram
sqram

Reputation: 7201

URL grammar rules

I made a pastebin site where each entry gets a random string. For example

example.com/ds34
example.com/sdf-2zA
example.com/234+_2

My question is, what is the grammar rule for these strings? Can that start with anything? which characters are/aren't allowed?

Upvotes: 1

Views: 913

Answers (1)

Konstantin V. Salikhov
Konstantin V. Salikhov

Reputation: 4653

See in RFC and w3.org. In short - any ASCII symbol excluding reserved ! * ' ( ) ; : @ & = + $, / ? % # [ ]. Other symbols can be percent-encoded.

Upvotes: 4

Related Questions