Welcome! Log In Create A New Profile


help with regex in nginx map

September 15, 2022 01:30PM
Hello there,

I'm trying to write a simple regex for a map where only the first part of a string should match. I went through the documentation, which unfortunately didn't have much examples.

Heres what I'm trying to achieve -

map $string $redirct_string{
"~^abc*$" 1;

I also tried to change the regex to a simple "abc*", but it didn't work. Please let me know where am I going wrong.

Thank you for your answer.
Subject Author Posted

help with regex in nginx map

libresco_27 September 15, 2022 01:30PM

Re: help with regex in nginx map

Francis Daly September 15, 2022 06:48PM

Sorry, only registered users may post in this forum.

Click here to login

Online Users

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