Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can a URL have an asterisk?

Tags:

I notice Wikipedia allows them in their URLs, is it legit or does anyone know where it will give me problems?

like image 534
Kristopher Ives Avatar asked Jan 10 '11 05:01

Kristopher Ives


People also ask

Can an asterisk be in a URL?

*'()," [not including the quotes - ed], and reserved characters used for their reserved purposes may be used unencoded within a URL.

What is a wildcard URL?

Wildcard URLs provide a way to load content dynamically depending on the page URL. By using wildcards, you can pass the values of query string parameters directly as part of the URL path.

What characters can you use in URL?

A URL is composed of a limited set of characters belonging to the US-ASCII character set. These characters include digits (0-9), letters(A-Z, a-z), and a few special characters ( "-" , "." , "_" , "~" ). When these characters are not used in their special role inside a URL, they must be encoded. Question mark (“?”)

Can a URL have an ampersand?

No. Unfortunately you can't use ampersands (&) as part of your domain name. Characters that you can use in your domain name include letters, numbers and hyphens.


2 Answers

It's legit and intended to be a delimiter ; see Uniform Resource Identifier (URI): Generic Syntax

like image 146
Richard Harrison Avatar answered Sep 29 '22 03:09

Richard Harrison


As per http://www.ietf.org/rfc/rfc1738.txt YES, you can.

...Only alphanumerics [0-9a-zA-Z], the special characters "$-_.+!*'()," [not including the quotes - ed], and reserved characters used for their reserved purposes may be used unencoded within a URL.

refer: http://www.blooberry.com/indexdot/html/topics/urlencoding.htm

like image 36
Nishant Avatar answered Sep 29 '22 03:09

Nishant