.htaccess 文件
RewriteEngine On RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d [OR] RewriteCond %{REQUEST_FILENAME} -l RewriteRule . - [NC,L] RewriteRule . index.php [NC,L]
Nginx
location / { index index.php index.html index.htm; if ($request_uri ~ (.+?\.php)(|/.+)$) { break; } if (!-e $request_filename) { rewrite ^/(.*)$ /index.php/$ last; } } location ~ ^/shopadmin { rewrite ^/(.*)$ /index.php/$ last; break; }
if ( $host != 'pay.demo.com.cn' ){ rewrite ^/(.*)$ http://pay.demo.com.cn/$1 permanent; }