Change the PHP Query String Variable Separator Using php.ini
As you probably know, the default PHP query string variable separator is the "&" character. One annoyance with using the "&" character is that, in order to have valid XHTML syntax, you need to output your &'s as "&". If you'd like to avoid all of that mess, you can simply change the separating character to a semi-colon (;). Here's how:
The PHP
//inside the php.ini file
arg_separator.input = ";"
//example URL: /page.php?key1=value1;key2=value2;key3=value3
There you go -- one easy step to outputting cleaner URLs. Do any of you use this method?
CSS animations are right up there with sliced bread. CSS animations are efficient because they can be hardware accelerated, they require no JavaScript overhead, and they are composed of very little CSS code. Quite often we add CSS transforms to elements via CSS during...
Your early CSS books were instrumental in pushing my love for front end technologies. What was it about CSS that you fell in love with and drove you to write about it?
At first blush, it was the simplicity of it as compared to the table-and-spacer...
Remember the Web 1.0 days where you had to customize your site in every way possible? You abused the scrollbars in Internet Explorer, of course, but the most popular external service I can remember was CometCursor. CometCursor let you create and use loads of custom cursors for...
Every once in a while I come across a plugin that blows me out of the water and the most recent culprit is PassShark: a MooTools plugin that duplicates the iPhone's method of showing/hiding the last character in a password field. This gem of...
Personally I set it to & which validates fine.
and if you don’t have access to the ini file the following works:
pretty useful
Didnt know this one, thx ;)
And how Search engines see on this trick?
@wsr: Search engine sees it as the same — you wouldn’t be penalized by this.
@david: Maybe, but standart is “&” and many SE use this symbol to explode and analyze query string…
I think this will break a 3rd party CMS(like wordpress).
Think SEO
If you really want to display pretty URLs it’s better to use mod_rewrite.
Keep in mind that XML invalidates the & symbol when it’s located in the href tag.
To validate your XML you have to supply & EG: href=”?i=1&x=2″
When using this method the return value in the URI will return as “&”, and if you are using relative URLs in your application navigation, this will invalidate the DOM generated XML in most browsers and stop page load in Google Chrome (Safari).
Result: href=”/mypage.php?i=1&x=2″
Returns – EntityRef: expecting ‘;’
To fix the above the first example href=”?i=1&x=2″ should read with &
like so
href=”?i=1&x=2″