I’m currently developing a website using Sublime as my IDE and PHP, CSS, JS, and HTML as the programming languages. I’ve set up a local development environment using XAMPP on Windows 11.
My website files are located in the htdocs folder, which is the default root directory for XAMPP. Here’s the structure of my project folder:1st Image:(https://i.sstatic.net/ADMH4 2nd Image:(https://i.sstatic.net/9sg9pOKN.png)a8J.png).
When I try to view my website via http://localhost:8000, it’s showing me the XAMPP dashboard instead of my website files.Here is what it shows me once I view the site: (https://i.sstatic.net/DaGzNFz4.png) and (https://i.sstatic.net/8M3ekjtT.png)
Steps taken so far:
Installed XAMPP and ensured that Apache and MySQL services are running.
Checked that my website files are indeed in the htdocs folder.
Ensured there are no conflicting ports.
Expected behavior:
When I navigate to http://localhost:8000, I expect to see my website displayed. Instead, I’m seeing the files inside the dashboard folder.
Actual behavior:
The browser redirects me to the dashboard folder instead of displaying my website files.
I’ve tried the following steps to resolve the issue:
Checked file paths: I’ve verified that my website files are indeed located in the htdocs folder and that the file paths in my code are correct.
Restarted Apache: I’ve restarted the Apache server multiple times from the XAMPP Control Panel to ensure that any changes take effect.
Tried accessing specific files: I attempted to access my website’s main file directly by navigating to http://localhost/my_website/index.php, but it still redirects me to ‘404 not found’.
Reviewed XAMPP configuration: I’ve reviewed the httpd.conf and httpd-vhosts.conf files in the XAMPP apacheconf directory to check for any misconfigurations, but everything seems to be in order.
Blessing Tshiyole is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.