About us | RCL 20 | Projects | Colour Selector | Library |
dot slash ~ keep your URLs trimDon't you just hate it when "index.html" appears in the page location when you're exploring your own web site? Most people now know that although their home page is called something like index.html, they can get to and advertise the home page by using the web address www.site.com. It's (thankfully) quite rare that web site addresses are advertised as www.site.com/index.html. If you go to a site using www.site.com and then click back to the home page, the page location is often shown as www.site.com/index.html. There is a very simple way to stop this from happening on your own sites. I've listed the HREFs to use to link to the home page or to other default pages in directories so that index.html won't appear in the page location. The first list describes relative links, the next absolute.
An example of a web site which uses relative links in this way is my personal web site. Absolute linksAlternatively, if the home page of your live web site is in the root directory, use absolute links.
The advantage of absolute links is that you use the same HREFs to link to specific pages regardless of where on the web site the pages are which include those links. The disadvantage of absolute HREFs is when your local development copy of the web site isn't in the root directory. Using links then becomes impossible. |
Copyright © Limitless Innovations 2024
www.limov.com/library/dot-slash-keep-your-urls-trim.lml |