Questions tagged [regular-expressions]
The regular-expressions tag has no usage guidance.
4
questions
2
votes
1
answer
13k
views
nginx httpMapModule regex variables
The HttpMapModule documentation states that:
Since 1.0.4, case insensitive regular expressions can be used by prefixing the pattern with ~*.
And gives the example:
map $uri $myvalue {
/aa ...
9
votes
2
answers
14k
views
Apache 2: Negative FilesMatch / FilesNotMatch
If I want to apply a rule to only some files in apache2.conf, I can use <FilesMatch>.
For example:
<FilesMatch ".(gif|jpg|jpeg|png|mpg|avi)$">
deny from env=hotlink
</FilesMatch&...
2
votes
2
answers
972
views
Finish processing rewrite directives in location and return 301
I have the following in my nginx.conf:
location ~* /collections.*?products/([^/]+)/?$ {
rewrite ^/collections.*?products/([^/]+)/?$ /$1.html;
rewrite ^([^_]*)_([^_]*)_(.*)$ $1-$2-$3;
...
0
votes
2
answers
3k
views
Is it possible to write a regular expression that catches a match that others have missed in IIS?
I have written a list of regular expressions that currently redirect unused pages to the appropriately used pages e.g. if someone were to request abc.aspx it redirects them to home.aspx in IIS however ...