Apache的Rewrite
#.htaccess, 当然也可以写在httpd.conf RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteRule .* index.php
Nginx的Rewrite
server { listen ****; server_name domain.com; root document_root; index index.php index.html index.htm; if (!-e $request_filename) { rewrite ^/(.*) /index.php/$1 last; } }
Lighttpd的Rewrite
$HTTP["host"] =~ "(www.)?domain.com$" { url.rewrite = ( "^/(.+)/?$" => "/index.php/$1", ) }