Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Can anyone give an example of Url when the following two configs behave differently?

e.g.

location ~ /\. { 
..

location ~ (^|/)\. { 
..
share|improve this question

closed as not a real question by Michael Hampton, mdpc, Magellan, Scott Pack, Wesley Nov 29 '12 at 19:00

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

add comment

1 Answer

up vote 2 down vote accepted

(^|/)\. is pointless overcomplicated and fully equivalent to /\. since all URI paths in nginx begin with /.

share|improve this answer
    
What if user request GET foo instead of GET /foo? Will nginx also append a /? –  Ryan Nov 29 '12 at 17:52
    
Nginx will return the 400 Bad Request error, just like any other HTTP server to respect RFC. –  VBart Nov 29 '12 at 18:58
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.