Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
[wiki] Clean URLs and ampersands problem
I’ve been working in trying to get Clean URLS working in textbook and I have come across one show stopper. Mod_rewrite will not allow for ampersands (&) in the url.
The german page Einsteiger & Anfänger is a good example of this. Using messy URLs the address of the page becomes Einsteiger_%26_Anf%C3%A4nger however when using clean urls teh adress becomes Einsteiger_&_Anf%c3%a4nger as apache decodes the %26 into an ampersand. MediaWiki then treats & as a regular query string and cannot find the page.
I’m not sure how many pages with ampersands in the title there are (doesn’t seem like many from my cursory look) but they would have to be moved to new pages without ampersands in the titles and no new pages with ampersands could be created in order for clean urls to work.
Is this something we want to pursue?
Shoving is the answer – pusher robot
Offline
#2 2006-12-10 22:15:03
- marios
- Archived Plugin Author

- Registered: 2005-03-12
- Posts: 1,253
Re: [wiki] Clean URLs and ampersands problem
@patrik, excellent spot.
One question: Does this appear on english pages as well ? (couldn’t remember)
regards, marios
⌃ ⇧ < ⎋ ⌃ ⇧ >
Offline
Re: [wiki] Clean URLs and ampersands problem
It’s probably not just the ampersand that is affected, but also the equal sign, questionmark and perhaps forward slash as well.
Offline
Re: [wiki] Clean URLs and ampersands problem
I expect the equals sign, question mark and slash don’t happen to come up in text as much if at all.
For the German, simply replace the & with “und” (bet you knew that already ;-). In my view, clean urls are definitely worth more than a few shifted pages.
TXP Builders – finely-crafted code, design and txp
Offline
Re: [wiki] Clean URLs and ampersands problem
Quite a number of question marks in page titles for the FAQ translation pages. More there to do yet too, though I don’t know if anyone will follow through with it now.
Offline
#6 2006-12-11 01:49:32
- marios
- Archived Plugin Author

- Registered: 2005-03-12
- Posts: 1,253
Re: [wiki] Clean URLs and ampersands problem
I realize that none of the cross lang section links are working at this stage.
( Also the lang attribute is not present in either localized section Url, title=de, etc… , if the URLs are set to clean, where are the lang attributes ?)
Last edited by marios (2006-12-11 01:51:51)
⌃ ⇧ < ⎋ ⌃ ⇧ >
Offline
Re: [wiki] Clean URLs and ampersands problem
@marios: English pages have the same problem if an ampersand is present although the English title to this page in question does not have an ampersand
@ruud, jakob and destry: Equal signs, slashes and question marks seem to survive the rewrite oddly enough.
@marios: Not sure I’m fully understanding but the paths then become /lang-code/page-title.
If you all want to see it in action I setup a test wiki at http://textbook.textpattern.net/test-wiki/ The automatic interwiki links like the language sidebar don’t work because the interwiki links explicitly point to http://textpattern.net/wiki but the links in the page content all work.
Shoving is the answer – pusher robot
Offline
#8 2006-12-11 19:05:46
- marios
- Archived Plugin Author

- Registered: 2005-03-12
- Posts: 1,253
Re: [wiki] Clean URLs and ampersands problem
@hakjoon, this looks much nicer.
(Clean URL’s would be a huge improvement)
What do you want me to do, prior you set this up. Just let me know.
regards, marios
⌃ ⇧ < ⎋ ⌃ ⇧ >
Offline
Re: [wiki] Clean URLs and ampersands problem
You shouldn’t need to do anything before I make the change. In fact you can go ahead an build pages without worrying about it (just don’t use ampersands) I’ll setup the redirects for the german pages replacing the & for und and then make the swithcover.
The old query strings urls will still work so we should be ok with links out in the wild.
Shoving is the answer – pusher robot
Offline