Forum Moderators: phranque
/news.php?cat=1&pg=4
redirect to
/news.php?cat=1;pg=4
I have used
RewriteCond %{query_string} ^cat\=([0-9]+)\&pg\=([0-9]+)
RewriteRule ^news\.php$ /news.php?cat=%1;pg=%2 [R=301,L]
The log shows:
"GET /news.php?cat=1&pg=4 HTTP/1.1" 301 254 "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows
"GET /news.php?cat=1%3bpg=4 ...
So looks like the ";" has not been treated as a delimiter. The rewrite urlencoded it as '%3b'.
How can I force ";" to be the delimiter?
What is the source of the recommendation to use ";" as a query parameter delimiter?
Wiz
What is the source of the recommendation to use ";" as a query parameter delimiter?
It is recommended by W3C. I have found this link:
[w3.org...]
There may be more information exists other than this.
We recommend that HTTP server implementors, and in particular, CGI implementors support the use of ";" in place of "&" to save authors the trouble of escaping "&" characters in this manner.
Ah, OK. In this case, I'd say that the best thing to do at this time is to ignore the character-entity validation problem until such time as the major servers handle it gracefully.
It's one of those, "If you want to make an omelet, you have to break some eggs"-type problems. W3C is "out-front" on this issue, and the server implementors will have to catch up.
Jim