I will assume that the site is already on a web server (it can be with localhost).
If the server is Apache it is very easy to resolve this. Just create or modify the file/file .htaccess at the site root (where index.html is located) with the following code:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.html/$1 [L]
If it doesn’t work I recommend changing the index.html for index php. and thus use the following code in .htaccess:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
Attention that for this to work it is necessary that the rewrite must be enabled on the server (by default is).
It can also happen that you’re not using Apache and there is already outside my area of knowledge.
I hope I helped :D
It will already look like this by default. Servers, by default, will look for a file called
index
in the root directory when no file is passed through the URL and when passed, the server will attempt to open the file. Did you have any trouble when you tried to do that?– Woss
Are you trying to make url friendly? If so, although not the best, use folders. The folder name is the one that will be in the URL and in each folder an index.html Example: site.com/ [index.html] site.com/pagina1/ [index.html (with other content)] site.com/[pagina2/ [index.html (with other content)] site.com/pagina3/ [index.html (with other content)]
– Vítor André
The default site is this: Index.html the other files will be: URL/page.html
– alexjosesilva