[ Team LiB ] |
Recipe 5.5 Aliasing Several URLs with a Single DirectiveProblemYou want to have more than one URL map to the same directory but don't want multiple Alias directives. SolutionUse AliasMatch in http.conf to match against a regular expression: AliasMatch ^/pupp(y|ies) /www/docs/small_dogs DiscussionThe AliasMatch directive allows you to use regular expressions to match arbitrary patterns in URLs and map anything matching the pattern to the desired URL. Think of it as Alias with a little more flexibility. This example causes URLs starting with /puppy, as well as URLs starting with /puppies, to be mapped to the directory /www/docs/small_dogs. Apache's regular expression syntax is discussed in much greater detail in Appendix A. See Also
|
[ Team LiB ] |