<IfModule mod_rewrite.c>
Options +FollowSymlinks -Multiviews
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php [L,E=PATH_INFO:$1]
</IfModule>然后我的nginx如下server {
listen 80;
server_name 192.168.100.60;
set $root /Applications/MxSrvs/www/liboom/public/;
#access_log /Applications/MxSrvs/logs/tp5.log;
include vhosts/_nginx.vhost.fpm;
root $root;
location / {
index index.php index.html index.htm;
try_files $uri /index.php$uri;
if ( !-e $request_filename) {
rewrite ^(.*)$ /index.php?s=/$1 last;
break;
}
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
location ~ \.php(.*) {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
include fastcgi_params;
}
}请各位大佬教我 最佳答案