NGINX Remove index.php /index.php/something/more/ to /something/more
This was the line I was looking for, I did it my self. I could have some bugs.
What do you think?
server {
....
rewrite ^/index.php/(.*) /$1 permanent;
....
}
I've try it on CodeIgniter 1.7 & 2.0, and i change
config.php $config['uri_protocol'] = "REQUEST_URI";
and i add try_files $uri $uri/ /index.php?r=$request_uri;
on nginx.conf, and worked
location / {
auth_basic "example Team Access";
auth_basic_user_file config/htpasswd;
root /sites/vip.example.com;
index index.php;
try_files $uri $uri/ /index.php?r=$request_uri;
}
maybe it same on DooPHP
Add this to nginx server config part.
location / {
if (!-e $request_filename) {
rewrite ^/([^?]*)(?:\?(.*))? /index.php?title=$1&$2 last;
}
if ($uri ~* "\.(ico|css|js|gif|jpe?g|png)(\?[0-9]+)?$") {
expires max;
break;
}
}