我的httpd.conf文件中包含以下行:
AliasMatch ^/myProject/src/foobar/(?:.*)$ /myProject/src/foobar/index.html
我想对任何与模式匹配的URLhttp://localhost/myProject/src/foobar/(.*)$
进行重定向,以将其重定向到我在处闲逛的index.html文件http://localhost/myProject/src/foobar/
。取而代之的是,当我尝试访问文件foobar
夹中的任何文件时,都得到404 。是什么赋予了?
语法:AliasMatch正则表达式 file-path|directory-path
示例:
AliasMatch ^/one c:/wamp/www/index.php
[windows]
AliasMatch ^/icons(.*) /usr/local/apache/icons$1
[linux]
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句