LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-18-2012, 12:02 PM   #1
ubungu
LQ Newbie
 
Registered: Jun 2012
Location: /home/ubungu
Posts: 27

Rep: Reputation: Disabled
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;
        break;
    }

I known that will remove index.php

example mydomain.com/tools/index.php/controller will rewrite to mydomain.com/tools/controller

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

Thank you very much!
 
Old 07-19-2012, 07:51 AM   #2
ubungu
LQ Newbie
 
Registered: Jun 2012
Location: /home/ubungu
Posts: 27

Original Poster
Rep: Reputation: Disabled
Please help me
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
nginx rewrite mad_penguin Linux - Newbie 0 02-25-2012 12:53 AM
LXer: Using a Rewrite in Nginx for feedburner LXer Syndicated Linux News 0 06-17-2011 11:40 AM
nginx rewrite / redirect LMW Linux - Server 4 05-14-2011 11:37 AM
Problem with dynamic url rewrite and redirect in nginx??? gavin2u Linux - Server 3 05-27-2010 10:25 PM
nginx 0.7.65 rewrite url with querystring problem? gavin2u Linux - Server 0 04-07-2010 07:46 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:30 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration