-   Linux - Newbie (
-   -   nginx rewrite url (

ubungu 07-18-2012 01:02 PM

nginx rewrite url
Hi everybody!

This is my rewrite condition in my nginx virtual host

In server {} block
PHP Code:

location /tools/ {
    if (!-
e $request_filename)
rewrite ^/tools/(.*)$ /tools/index.php/$1 last;

I known that will remove index.php

example will rewrite to

I guest $1 are controller, controller/function, controller/function/variable
Can you tell me is that true? :(

And the 'last' string in command mean?

if (!-e $request_filename) means (my opinion): don't exists file $request_filename, is that true?.
I thank this condition must be: if (-e $request_filename)
Please tell me what case is true

Sorry for my english is not good :D

Thank you very much!

ubungu 07-19-2012 08:51 AM

Please help me :(

All times are GMT -5. The time now is 04:51 PM.