XAMPP localhost redirects to localhost/dashboard

后端 未结 8 690
梦毁少年i
梦毁少年i 2021-01-12 01:50

I\'ve just installed xampp-win32-5.5.30 and in xampp control panel both Apache and mysql started without any error but I found:

1)localhost

相关标签:
8条回答
  • 2021-01-12 02:20

    To solve this problem in windows I have edited two files.

    /Windows/System32/drivers/etc/hosts

    Add a line at the bottom like:

    localhost sitename.local
    

    /xampp/apache/conf/extra/httpd-vhosts.conf

    Add at the bottom:

    <VirtualHost *:80>
           DocumentRoot "C:/xampp/apps/magento/htdocs"
           ServerName sitename.local
    </VirtualHost>
    

    You may need to change the above to use your correct IP address (localhost), port number, and document root path. Then you will access the site in your browser by typing in sitename.local or whatever you changed it to.

    0 讨论(0)
  • 2021-01-12 02:20

    I had the same problem, I fixed it by removing the file named index in htdocs. Since that was redirecting me to the dashboard.

    0 讨论(0)
  • 2021-01-12 02:24

    As usually problem:

    • wp_config.php at your local file -wp_option after your importing your database
    • vhost.txt at xampp/apache/conf/extra/httpd-vhosts.conf

      <VirtualHost *:80>
             DocumentRoot "C:/xampp/apps/magento/htdocs"
             ServerName sitename.local
      </VirtualHost>
      
    0 讨论(0)
  • 2021-01-12 02:32

    Have you checked that your .htaccess file is properly configured? This is what solved the problem for me. RewriteEngine is ON and your RewriteBase should be specified, so if your website directory is within the htdocs folder your RewriteBase should be /MyWebsite/.

    0 讨论(0)
  • 2021-01-12 02:39

    Delete that file(index.php), you will get the list of directories and files from htdocs folder.

    0 讨论(0)
  • 2021-01-12 02:41

    I too got the same problem.

    Always when I try to access the file created in the htdocs, it was getting redirected to localhost/dashboard.

    What I did was, I checked all the files present in htdocs. There was a file applications. I opened it and found that it was actually redirecting me to the dashboard.

    So, I moved that file from htdocs.

    I could access my files from htdocs now without any redirection issues.

    0 讨论(0)
提交回复
热议问题