Welcome! Log In Create A New Profile

Advanced

Nginx location, return and rewrite directives

December 06, 2013 03:46AM
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
Subject Author Posted

Nginx location, return and rewrite directives

r004 December 06, 2013 03:46AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 295
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready