简体   繁体   中英

After successful installation, xampp redirects to localhost/xampp

I have followed Drupal's tutorial on how to successfully run a Windows server using xampp. I think I've done everything right, but when I go to my website, it goes to mywebsite/xampp.

Does anyone know what I need to do to solve this?

Which folder did you put your website files? What address did you type in the address bar? If using localhost or any other domain which redirects there, be sure you rename any index.php or index.html in the server root folder (htdocs). This is because most servers look for any file named this way when visiting any server folder and will automatically display that page when it finds it. In this case since you freshly installed xampp, their homepage is probably set to show by default 在此处输入图片说明

For example look at the picture. This is the index.php file in the htdocs folder. At the top you can see I've added a header to redirect to somewhere else. Below I commented out the code that was defaulted by the xampp installation, which pretty much said to relocate to the xampp/ directory (which then loads the index file there). If it failed to go there, you should see the message at the bottom

Something is wrong with your xampp installation :-(

If you're being redirected to the xampp/ directory you simply need to rename or edit the index.php file in the htdocs folder.

Ideally you should make a separate folder for your website in the htdocs folder, something like htdocs/myWebsite.

You can name your homepage either index.html or index.php (depending on which language you use) and then go to localhost/myWebsite and it will automatically load your homepage.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM