Nginx location, return and rewrite directives

r004 nginx-forum at nginx.us
Fri Dec 6 08:46:09 UTC 2013


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

the conditions are fuzzy for 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.

~:#>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 ;
~:#> 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
location /uc_server/ {

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

B.) I want these to happen:

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

AND

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

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,245275,245275#msg-245275



More information about the nginx mailing list