SV: Server_Name regular expression
jens.rantil at telavox.se
Fri Aug 30 10:34:53 UTC 2013
Maybe http://regex101.com/ could help?
Från: nginx-bounces at nginx.org [mailto:nginx-bounces at nginx.org] För Jonathan Matthews
Skickat: den 30 augusti 2013 10:54
Till: nginx at nginx.org
Ämne: Re: Server_Name regular expression
On 29 Aug 2013 10:01, "christospap" <nginx-forum at nginx.us<mailto:nginx-forum at nginx.us>> wrote:
> I would like to syntax a regular expression which will match two server
> names. The server names are example.com<http://example.com> and www.example.com<http://www.example.com>. In particular,
> a regular expression for www or nothing
> I wrote the following regular expression (www\.|)example.com<http://example.com>
Irrespective of your use of this in an nginx config, you have made a mistake constructing the regex. It's such a simple one that I feel relatively sure that you're a newcomer to such things, hence I would suggest you find a regex primer (book|website) and study it carefully.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the nginx