开发者

Case-insensitive Location

I am using VisualSVN Server that installs an Apache server.

In the below example

    <Location /MyIISWebSite>
      ProxyPass https://my-domain.com:8443/MyIISWebSite
      ProxyPassReverse https://my-domain.com:8443/MyIISWebSite
    </Location> 

how do I make the

    <Location /MyIISWebSite &开发者_运维技巧gt;

to be case insensitive in order to match all combinations (like myiiswebsite, MYIISWEBSITE, ...) ?


Use LocationMatch with a case-insensitive regex modifier, like so:

<LocationMatch "(?i)/MyIISWebSite">
...
</LocationMatch>


I've been using:

<LocationMatch "/(?i:mywebsite)">
    Allow from all
    Satisfy Any
</LocationMatch>

and that works on apache 2.2


This is a pretty old question. Just posting a solution which can be helpful for others.

I use ProxyPassMatch which is equivalent to ProxyPass but allows usage of regular expressions.

Refer Apache HTTP Documentation

Example :

ProxyPassMatch (?i)/abc http://mydomain.com/handle-all-variants-of-abc

This will match all combinations : (abc, abC, aBc, Abc, ABc, aBC, AbC, ABC)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜