September 19, 201016 yr Hi I am making a static website, using only with HTML. So my files all have the extension .html. So on my website a page will have the URL for example "mysite.com/menu.html". I see however that other sites have no file extension showing up in the URL. (for example the URL of a page can be "mysite.com/menu". How can they do that?
September 19, 201016 yr You can use mod_rewrite which tells a server to add the filename when the url is shortened. See http://www.modrewrite.com/ http://www.workingwith.me.uk/articles/scripting/mod_rewrite
September 19, 201016 yr Make a directory called "menu" and place the menu.html in there but rename it to index.html
September 20, 201016 yr Make a directory called "menu" and place the menu.html in there but rename it to index.html I thought about mentioning that simple method, but it's not a proper method and if viewers have already bookmarked your page, the bookmark won't work after creating annother directory and renaming the file, but if your site isn't live yet you could use that method.
Create an account or sign in to comment