Y
Y
YSPRO2013-04-26 09:14:56
Nginx
YSPRO, 2013-04-26 09:14:56

Regular expression for location?

It is necessary to proxy requests like /something.com
I tried it in different ways, as a result, both /something.com and /some/something.com were picked up (which is already superfluous)
I read the docks, I know that PCRE, I checked my regular expressions in ruby ​​and php, it works there , not in nginx.
Thank you in advance

Answer the question

In order to leave comments, you need to log in

2 answer(s)
Y
YSPRO, 2013-04-26
@YSPRO

Like ^/[^\.\/]+?\. fits

F
freeek, 2013-04-26
@freeek

And so we tried:

/^\/[^ \/ .*?]$/

?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question