LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Nginx location, return and rewrite directives (https://www.linuxquestions.org/questions/linux-server-73/nginx-location-return-and-rewrite-directives-4175486925/)

roo4 12-05-2013 01:22 AM

Nginx location, return and rewrite directives
 
I am having a hard time learning to do return and rewrite directives.

the conditions are like gibberish to me.
I am trying to learn by example, so I made one up.
in the htdocs of my server we have this file and folders.

Code:

~:#>ls htdocs
admin.php
api (dir)
api.php
archiver (dir)
config (dir)
connect.php
cp.php
crossdomain.xml
data (dir)
favicon.ico
forum.php
group.php
home.php
index.php
install (dir)
member.php
misc.php
plugin.php
portal.php
robots.txt
search.php
source (dir)
static (dir)
template (dir)
uc_client (dir)
uc_server (dir)
userapp.php

NOW; we just focus on the uc_server client ;
Code:

~:#> ls /htodcs/uc_server
admin.php
api (dir)
avatar.php
control (dir)
crossdomain.xml
data (dir)
images (dir)
index.php
install (dir)
js (dir)
lib (dir)
model (dir)
plugin (dir)
release (dir)
robots.txt
view (dir)

A.) So what is happening is in uc_server; I think we are better to create a block location like
Code:

location /uc_server/ {

        }

and do or conditional directives in there right????

B.) I want these to happen:

Code:

http://DOMAIN.DOM/uc_server/admin.php/uc_server/ ===changes to===> http://DOMAIN.DOM/uc_server/
AND

if there is ...../install/index.php/.... in any requested links ;the "/install/index.php/" part would be omitted and the link would processed without that part.
THANKS ALOT


All times are GMT -5. The time now is 02:31 PM.