0

I have XAMPP long time and i am using Apache for PHP websites. I have 5 configured vhosts, projects in same parent directory, with same vhost confing and dns setting. But my last configured vhost, after visit url get redirect to dashborad.

So after give to browser url: xxx.local a get redirect to address: xxx.local/dashboard and i can see some welcome html...

I have no clue what is going on.

Running on Win10, Xampp ver. 7.2.15

C:\Windows\System32\drivers\etc\hosts:

127.0.0.1 first.local 127.0.0.1 second.local 127.0.0.1 xxx.local 

C:\xampp\apache\conf\extra\httpd-vhosts.conf:

<VirtualHost *:80> ServerAdmin [email protected] DocumentRoot "C:/Projects/projectName/web/public_html" ServerName xxx.local ErrorLog "C:/Projects/projectName/logs/error.log" CustomLog "C:/Projects/projectName/logs/access.log" combined <Directory "C:/Projects/projectName/web"> AllowOverride All Order allow,deny Allow from all Require all granted </Directory> </VirtualHost> 

Project is in dir 'web' and index.php file is in 'web/public_html'

That same way i have configured more vhost and it works...

Difference is only:

  • in dir as projectName is '.'
  • all projects has index.php in dir 'public' this project in 'public_html' (configured as document root)

UPDATE:

If i delete file 'c:\xampp\htdocs\index.php' after visit url: 'xxx.local' i can see directory ('c:\xampp\htdocs') content. wt?

5
  • 1
    The redirect does not come from your Apache, but from the php scripts on that vhost. Commented Dec 3, 2020 at 18:58
  • What i am doing wrong? Every other vhost are running correctly... Commented Dec 3, 2020 at 18:59
  • Check your php scripts. Commented Dec 3, 2020 at 19:17
  • In index.php in path 'C:/Projects/projectName/web/public_html' is only echo and then exit. Commented Dec 3, 2020 at 19:18
  • Have you been able to figure this out ? I am having the same problem. Commented Sep 26, 2021 at 21:10

1 Answer 1

0

If you using vite server then I think you should find a hot file in public directory, if found this then remove it, after this browse your project

1
  • Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center. Commented Jul 24, 2024 at 22:07

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.