4 ms·
The web server is configured to use something like mod_rewrite to pass everything after index.php as a query string parameter to index.php. Many sites use this
by jhardcastle 13y ago
The web server is configured to use something like mod_rewrite to pass everything after index.php as a query string parameter to index.php. Many sites use this (though most don't do it so nakedly) to make pretty URLs that search engines and users prefer.
Essentially, the request is equivalent to index.php?Article=2013%2F12%2Fhow-blender-started or perhaps index.php?Year=2013&Month=12&Article=how-blender-started.
- Theodores 13y agoThey also need the following in the .htaccess: RewriteRule ^index\.php$ - [L] RewriteRule . /index.php [L]
- woutervdb 13y agoActually, you don't need to edit your server -at least with Lighttpd-. PHP automagically (or is this expected behaviour?) gets the string appended to /index.php for you! Check out the example at http://private.woutervdb.com/examples/url-query/index.php/Welcome,%20Hacker%20News http://private.woutervdb.com/examples/url-query/index.php/We...! I've made no changes to my webserver configuration. Works on Lighttpd on my laptop and webserver, not sure if Apache and IIS do this as well.
- lmz 13y agoIt's called PATH_INFO and is part of the CGI spec ("The PATH_INFO variable specifies a path to be interpreted by the CGI script"): http://tools.ietf.org/html/rfc3875#section-4.1.5 http://tools.ietf.org/html/rfc3875#section-4.1.5