Welcome! Log In Create A New Profile


Rewrite URL String - Regex [NOT FIXED]

Posted by daragiu 
Rewrite URL String - Regex [NOT FIXED]
August 18, 2022 09:26AM
I tried to use the rewrite to change one word from an URL and I can't see to find any solution. Basicaly I need the word "png" to transform into "jpeg".

My variant was this and it did't work.

location ~ ^/qtb/([^/]+)/?(.*)$
if ( $args ~* ^(.*)/png(.*)$ )
rewrite $args $1/jpeg$2;

I want to transform this URL:


In to this URL:

Sorry, only registered users may post in this forum.

Click here to login

Online Users

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