I have following .htaccess file
DirectoryIndex index.php
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^$ index.php [QSA,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php [QSA,L]
</IfModule>
<ifModule mod_php5.c>
php_flag display_errors Off
</IfModule>
My code is work fine using Apache. But now I'm using Nginx, here are my conf
server {
listen 80;
server_name example.com;
root /srv/www/example.com/public_html;
access_log /srv/www/example.com/logs/access.log;
error_log /srv/www/example.com/logs/error.log;
server_tokens off;
if (!-e $request_filename) {
rewrite ^(.*)$ index.php last;
}
location / {
index index.php;
}
location ~ \.php$ {
include /etc/nginx/fastcgi_params;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /srv/www/example.com/public_html$fastcgi_script_name;
}
}
But my code is not work, please help
Thanks