Welcome! Log In Create A New Profile

Advanced

rewrite or return directives for discuz v3.1

December 04, 2013 02:54AM
hello;
I want to write a block to put in my VHOST config file.
i want
1. if there is "/install/index.php/" in the link. it shouldbe removed from the link.
2. if the format is like /uc_server/blab.php/uc_server/blahblah ===it should change to===>/uc_server/blabal

what should I put in my VHOST config file and where?




my current VHOST format is :
[CODE]
server {
server_name www.DOMAINNAME;
rewrite ^(.*) http://DOMAINNAME$1 permanent;
}

server {
listen 80;
server_name DOMAINNAME;
root /var/www/DOMAINNAME/htdocs;
index index.php;
include /etc/nginx/security;

# Logging --
access_log /var/log/nginx/DOMAINNAME.access.log;
error_log /var/log/nginx/DOMAINNAME.error.log notice;

# serve static files directly
location ~* ^.+.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt)$ {
access_log off;
expires max;
}

location ~ \.php$ {
try_files $uri =404;
fastcgi_pass unix:/var/run/php5-fpm/DOMAINNAME.socket;
fastcgi_index index.php;
include /etc/nginx/fastcgi_params;
}
}
[/CODE]
Subject Author Posted

rewrite or return directives for discuz v3.1

r004 December 04, 2013 02:54AM

Re: rewrite or return directives for discuz v3.1

Jonathan Matthews December 04, 2013 06:48AM

Re: rewrite or return directives for discuz v3.1

Francis Daly December 04, 2013 03:54PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 62
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready