You are viewing a plain text version of this content. The canonical link for it is here.
Posted to apache-bugdb@apache.org by Jim Patterson <Ji...@Cognos.COM> on 2000/11/22 22:35:43 UTC

mod_alias/6881: AliasMatch syntax worked in last revision, now no longer matches

>Number:         6881
>Category:       mod_alias
>Synopsis:       AliasMatch syntax worked in last revision, now no longer matches
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    apache
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   apache
>Arrival-Date:   Wed Nov 22 13:40:01 PST 2000
>Closed-Date:
>Last-Modified:
>Originator:     Jim.Patterson@Cognos.COM
>Release:        2.0a8
>Organization:
apache
>Environment:
Windows 2000 SP1
Visual C++ 5.0 SP3
>Description:
I have been using AliasMatch to map an application virtual path to my application's web content directory. My intention is that if you put in the virtual path without a trailing slash it will enter the application, but it should not match a longer word that just happens to start with the name of my application. The syntax I use is as follows:
  AliasMatch ^/myapp($|/.*) "E:/Program Files/MyAppDir/webcontent$1"
but it no longer works. If I revert to this (somewhat less satisfactory) form:
  Alias /myapp "E:/Program Files/MyAppDir/webcontent"
then it works.
The first form worked in 2.0a7.

>How-To-Repeat:
Create an alias to a content directory on your PC with AliasMatch e.g.
    AliasMatch "/docs($|/.*)" "C:/Docs$1"
Place a default file into that directory e.g. "index.html" with some appropriate content.
Try the url http://localhost/docs
It should bring up the "index.html" with typical Apache defaults. Instead I receive a "Not Found" error.
If you replace the AliasMatch with a more normal Alias e.g.
    Alias "/docs" "C:/Docs"
then things work as expected but it will also match other names e.g. /docs2.
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:
 [In order for any reply to be added to the PR database, you need]
 [to include <ap...@Apache.Org> in the Cc line and make sure the]
 [subject line starts with the report component and number, with ]
 [or without any 'Re:' prefixes (such as "general/1098:" or      ]
 ["Re: general/1098:").  If the subject doesn't match this       ]
 [pattern, your message will be misfiled and ignored.  The       ]
 ["apbugs" address is not added to the Cc line of messages from  ]
 [the database automatically because of the potential for mail   ]
 [loops.  If you do not include this Cc, your reply may be ig-   ]
 [nored unless you are responding to an explicit request from a  ]
 [developer.  Reply only with text; DO NOT SEND ATTACHMENTS!     ]