无法使用localhost子域ex: abc.localhost 运行我的应用程序。它在Chrome中运行良好,但在Firefox / IE中无效
这是我的vhost条目的样子。我也尝试了ServerAlias名称,但似乎没有任何工作。任何线索都将受到高度赞赏。
<VirtualHost *:80>
# The name to respond to
ServerName abc.localhost
# Folder where the files live
DocumentRoot "<PATH">
# A few helpful settings...
<Directory "<PATH>"
Options -Indexes
</Directory>
<IfModule mod_headers.c>
Header add Access-Control-Allow-Origin %{AccessControlAllowOrigin}e env=AccessControlAllowOrigin
Header set Access-Control-Allow-Credentials true
</IfModule>
#ErrorDocument 404 /web/page-not-found.php
#ErrorDocument 500 /web/maintenance.php
RewriteEngine on
RewriteRule ^/assets/(.*) - [L,QSA]
RewriteRule ^/web/(.*) - [L,QSA]
RewriteRule ^/favicon.ico - [L,QSA]
RewriteRule ^/(.*).js - [L,QSA]
RewriteRule ^(.*)$ /index.php?__req__url=$1 [B,L,QSA]
# Apache will look for these two files, in this order, if no file is specified in the URL
DirectoryIndex index.php index.html