Hi, How can I create HTML pages with no extension? Here and there you see addresses like www.example.com/monkey, but how do they avoid the .html at the end (like www.example.com/monkey.html)? Thanks, Mads
This can be done a couple of ways: 1) Mod-Rewrite/.htaccess 2) Create a directory for each page, and upload the default file for your server in each directory (usually index.html/htm/php). So, the actual file may be example.com/monkey/index.html, but it can be accessed at example.com/monkey. H@H
It can be done with mod_rewrite in your htaccess. You can't be arsed making a lot of folders and index files.
yes, making a lot of folders and index files will be a hard work. I wouldn't suggest you to use this method if a lot of pages to be build in this way.
What about seo, what will be the best approach in relation to SEO? I have noticed WordPress doesn't have any extensions. Does anyone know how they implement that?
.htaccess only works on Apache and a couple of other webservers but doesnt work on IIS which is the 2nd most common server after Apache. IIS requires changes in the server itself - simple enough to do but not available on most shared hosting. There is no notable impact on SEO as file extensions in themselves arent factored in
RewriteRule ^(.*)\.php$ /$1 [R=301,L] should work then (haven't tested it yet, I plan to use it on a domain that haven't been redirected to my server yet).
putting an index.htm / index.html / index.php in a folder with the name monkey will solve the problem easily.