, , . - , , Apache: mod_rewrite: Spcaes URL-, , .
, . http://httpd.apache.org/docs/current/mod/core.html#allowencodedslashes
( Apache -.htaccess ).
, . Apache URL- , rewrite, , : http://example.com/a+b.html wouldn '
"a b.html".
PHP $_GET ( , ) , . , Apache % 2B + , + , .
, , +, , URL-, %20. , , . , .
- DIY, :
RewriteRule. * index.php [L]
, index.php, . , . , , . RewriteCond% {REQUEST_FILENAME}! -f
index.php
$uri = substr ($ _ SERVER ['REQUEST_URI'], 1);//
$qmpos = strpos ($ uri, '?');// , ,
if ($ qmpos! == FALSE) {$ uri = substr ($ uri, 0, $qmpos); }// q.m.
$decoded = urldecode ($ uri);// URL
if (! empty ($ decoded)) {$ _GET ['args'] = $decoded; }// $_GET
( - , , - ) args PHP $_GET, $_GET .
, URL- (http://example.com/) , (http://example.com/?foo=1), (http://example.com/bar) (http://example.com/bar?foo=1). , .
, PHP . , rawurldecode, .