Apache xampp-mysite.local重定向到xampp文件夹

Apache xampp-mysite.local重定向到xampp文件夹,apache,xampp,localhost,httpd.conf,vhosts,Apache,Xampp,Localhost,Httpd.conf,Vhosts,我整个晚上都在和这件事作对,看不出哪里出了问题。我想在xampp上设置一个主机mysite.local,并按照所有说明操作,但我一直被重定向到mysite.local/xampp 你知道我哪里做错了吗?路径是正确的,我已经重新启动了Apache:) 我编辑了我的主机文件以添加: 127.0.0.1 mysite.local 我编辑了extra/httpd-vhosts.conf: NameVirtualHost localhost:80 <VirtualHost localhost:

我整个晚上都在和这件事作对,看不出哪里出了问题。我想在xampp上设置一个主机mysite.local,并按照所有说明操作,但我一直被重定向到mysite.local/xampp

你知道我哪里做错了吗?路径是正确的,我已经重新启动了Apache:)

我编辑了我的主机文件以添加:

127.0.0.1   mysite.local
我编辑了extra/httpd-vhosts.conf:

NameVirtualHost localhost:80
<VirtualHost localhost:80>
ServerName localhost
DocumentRoot "/Applications/XAMPP/xamppfiles/htdocs"
<Directory "/Applications/XAMPP/xamppfiles/htdocs">
  Options Indexes FollowSymLinks MultiViews
   AllowOverride all
       Order Deny,Allow
       Allow from all
</Directory>
</VirtualHost>

<VirtualHost localhost:80>
<Directory "/Applications/XAMPP/xamppfiles/htdocs/wd">
   Options Indexes FollowSymLinks MultiViews
   AllowOverride all
       Order Deny,Allow
       Allow from all
</Directory>
    DocumentRoot "/Applications/XAMPP/xamppfiles/htdocs/wd"
    ServerName mysite.local
</VirtualHost>
NameVirtualHost本地主机:80
服务器名本地主机
DocumentRoot“/应用程序/XAMPP/xamppfiles/htdocs”
选项索引跟随符号链接多视图
允许超越所有
命令拒绝,允许
通融
选项索引跟随符号链接多视图
允许超越所有
命令拒绝,允许
通融
DocumentRoot“/Applications/XAMPP/xamppfiles/htdocs/wd”
ServerName mysite.local

我昨天刚遇到同样的问题。即使您所执行的步骤在上下文中是正确的,您也需要执行更多的任务;) 您还需要编辑Apach'es
httpd.conf
引用您的新虚拟主机,如下所示:

# Your great site!
<Directory "/Applications/XAMPP/xamppfiles/htdocs/wd">
  Options Indexes FollowSymLinks Includes ExecCGI
  AllowOverride All
  Order allow,deny
  Allow from all
</Directory>
请记住使用所需的正确正则表达式,不要忘记在生产网站中采取更安全的预防措施;)我真希望我帮了你()

RewriteEngine On
RewriteBase /
RewriteRule ^.*$ public/index.php [NC,L]