]> sipb.mit.edu Git - ikiwiki.git/blob - doc/forum/Spaces_in_URLs.mdwn
comment about legality of whitespace in urls and %20
[ikiwiki.git] / doc / forum / Spaces_in_URLs.mdwn
1 There is one file on my site that had a space in the name;
2 on my old site, this link worked:
3 [http://dada.pink/scarsdale/Statement 20140527.pdf](http://dada.pink/scarsdale/Statement 20140527.pdf)
4
5 Now that I've moved to Ikiwiki, that doesn't work. So I moved the file here:
6 [http://dada.pink/scarsdale/Statement_20140527.pdf](http://dada.pink/scarsdale/Statement_20140527.pdf)
7
8 Is there a better approach to maintaining this link than setting an alias in Apache?
9
10 > You can add the space character to the `wiki_file_chars` argument in your setup file. -- [[Jon]]
11
12 >> a space character is not allowed in a url; user agents that read one usually represent it in percent encoded form (`%20`). if you use that, things also work for direct links, which i assume caused the problem (for both the links in the original description render correctly): `\[[http://dada.pink/scarsdale/Statement%2020140527.pdf]]` renders [[http://dada.pink/scarsdale/Statement%2020140527.pdf]].
13 >>
14 >> spaces are allowed in internal pages because wiki page names are not urls per se but converted using conversion rules -- this allows people to not think about url rules and just link to pages, but when you're linking outside ikiwiki, some strings just aren't valid urls. --[[chrysn]]