Welcome! Log In Create A New Profile

Advanced

nginx rewrite & parameter full-url and file extensions

April 26, 2016 12:49PM
Hi,
I will try to be brief. I have the following nginx rewrite url:

rewrite ^/(.*)?$ /index.php?completeURL=$1 last;

I want a url like:
http://mywebsite.com/http://www.otherwebsite.com/dir1/dirx/article.php&id=2&category=1

request:
http://mywebsite.com/index.php?completeURL=http://www.otherwebsite.com/dir1/dirx/article.php&id=2&category=1

Currently the nginx rule have a problem. Example: If the parameter contains a .php extension he looks for that file on my server.

Example: http://mywebsite.com/article.php

How can I solve this problem in your opinion?
Subject Author Posted

nginx rewrite & parameter full-url and file extensions

iivan April 26, 2016 12:49PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 109
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