Nginx + CodeIgniter + Invision power board rewrite rule probem.
- by Ufuk
Hello,
I have a setup where I have a folder structre like:
/
/application
/system
/forum
index.php
My ngix configuration:
if (!-f $request_filename) {
rewrite ^/(.*)$ /index.php/$1 last;
}
location ~ /index.php {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include /usr/local/nginx/conf/fastcgi_params;
fastcgi_param SCRIPT_FILENAME /var/www/vhosts/mydomain.com/httpdocs/index.php;
}
This setup works correctly and redirects urls to correct controller of codeigniter yet it does also forward www.mydomain.com/forum to codeigniter, which eventually shows a 404 page of CodeIgniter.
Does anyone know the correct configuration for my setups?
Thank you.