I am beginner, and i want to store .html files in the /htdocs(root) directory in apache (xampp server).

I have server name as example.com (localhost) and I want display login.html file after the index.html page. but, I don't know how to store webpages to server and how to view them on browser?

1 Answer 1


Inside of your htdocs folder you should create another folder. Call it something like /site1 and put both of your index.html and login.html files. To view your files, first make sure that your XAMPP is up and running and then type in the following URL into your browser:

http://localhost:8888/site1/ (this will open your index.html page)

http://localhost:8888/site1/login.html (this will open your login.html page)

Note: 8888 is the default Apache port but if you are using a different one then substitute that part of the URL.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.