1

Guys please help me to cover all the tm*.html pages in my location math

location /tacticalsales/tm(.*).html$ { }

Cannot get the wildcard to work. Please also add some explanation on this or refer to documenation. Thanks

Also please help with ading regex for numbers only.. somehting like this [1-10] instead of (.*) should work?

2
  • Ok Answering on my question location ~ ^/tacticalsales/tm[1-9].html$ { this works for nubmers... but need to now alternative for * wildcard macthing Commented Aug 26, 2016 at 12:22
  • Well This one is good location ~ "^/tacticalsales/tm([1-9]|10).html$" But I need to cover also the pages like tm5hjdf.html or tm6c.html Commented Aug 26, 2016 at 12:29

1 Answer 1

2

It's not 100% clear what you're asking for (this might be down to me), but I've tried to answer as best as possible

^((tacticalsales\/)?tm([0-9]|10).*?\.html)$

This will match on the three examples that you have given (tm5hjdf.html & tm6c.html) as well as if they're prefixed with tacticalsales/.

Hope this helps!

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.