When I look at Amazon.com and I see their URL for pages, it does not have .htm
, .html
or .php
at the end of the URL.
It is like:
http://www.amazon.com/books-used-books-textbooks/b/ref=topnav_storetab_b?ie=UTF8&node=283155
Why and how? What kind of extension is that?
The three most common ways are to: Use index pages (i.e. just create a directory and put an index. html file in it). Use a rewrite engine (such as Apache's mod_rewrite) to map the URLs onto different files (this is a common approach in PHP-land).
You can now link any page inside the HTML document without needing to add the extension of the page as no extension will be visible now in the URL of the website. The search engine may index these pages as duplicate content, to overcome this add a <canonical> meta tag in the HTML file.
To hide the . HTML extension, first, you go to the Cpanel of your website. Or go to Public_html and create a file called . htaccess.
Your browser doesn't care about the extension of the file, only the content type that the server reports. (Well, unless you use IE because at Microsoft they think they know more about what you're serving up than you do). If your server reports that the content being served up is Content-Type: text/html, then your browser is supposed to treat it like it's HTML no matter what the file name is.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With