Search code examples
htmlxampphtdocs

how to display first page in localhost?


I am using Xamp to create a website, I am having a folder named HTML which has a page called Cart.html, the folder HTML is found in htdocs and I want Cart.html to appear as soon as localhost is being input in the browser. That is when I input http:// localhost/, the Cart.html page should appear. I am unable to do, can u suggest me how to do it.


Solution

  • Simple HTACCESS rule:

    Redirect 301 index.html Cart.html
    

    Assuming they are in the same folder, otherwise replace with whatever needed