Welcome! Log In Create A New Profile

Advanced

Nginx rewrite. Analogue option for Apache: AllowEncodedSlashes

Posted by sb9 
sb9
Nginx rewrite. Analogue option for Apache: AllowEncodedSlashes
January 04, 2014 07:32AM
Hi,

I just moved from Apache to Nginx.
All .htaccess rewrite rules changed success.
Cool!
But one thing not moved.
It's option from Apache: AllowEncodedSlashes
As e.g.:
A lot of links:

http://site.com/page.php/getparam1/getvalue1/getparam2/getvalue2
http://site.com/nextpage.php/getparam1/getvalue1/getparam2/getvalue2/getparam3/getvalue3

The Nginx must convert it as:

http://site.com/page.php?getparam1=getvalue1&getparam2=getvalue2
http://site.com/nextpage.php?getparam1=getvalue1&getparam2=getvalue2&getparam3=getvalue3

A lot of pages. A lot of $_GET values different count.
It's impossible add rules for it.
Because it's $_GET values and it can be changed any time.

I need some this:

rewrite ^/(.*\.php)/(.*)/(.*)$ /$1?$2=$3

But it's static and not good decision.

Thank you.



Edited 3 time(s). Last edit at 01/04/2014 07:34AM by sb9.
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 202
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready