I want to start creating my website but I have a few questions.http://website.com/directory/webpage - in this kind of website, it does not display a .php or .HTML extension at the end. How to achieve this? if I have several pages like contact.html, aboutme.html etc Should I just create separate html files, or should I do something in one main index.php file and use PHP or JavaScript to handle the content according to the URL. Which is a more appropriate workflow?
Organizing website files
web development;htaccess;url;filenames
There are several ways to serve files without an extension.  One of the easiest is to use the Multiviews option in your .htaccess.   That option allows the /webpage.html document to be accessed through the /webpage URI.  Then you can use a rewrite rule to make sure that the version with .html gets redirected to the version without the extension.  Here is the .htaccess:Options +MultiViewsRewriteEngine OnRewriteRule (.*)\.html $1 [R=301,L]Another way of doing it is having your entire site be handled by a single script that prints the correct page based on a parameter, and then use .htaccess to rewrite everything into that script.  Here is the .htaccess for that approach.RewriteEngine onRewriteCond %{REQUEST_FILENAME} !-dRewriteCond %{REQUEST_FILENAME} !-fRewriteRule ^(.*)$ /thescript.php?s=$1 [L]Many content management systems (CMS) such as Wordpress name your URLs for you, and have settings for the style of URL that you wish to use.  In Wordpress this can be controlled under Setting -> Permalinks where there are several options, none of which use the .html extension.  I also use the custom permalinks plugin that allows me to specifically choose the URL that I want for every page.As for your question about the number of pages on your site, it is common practice to have separate pages for contact.html, about.html, privacy.html, and faq.html.  I could see merging contact information with about us information, but I wouldn't try to put everything in one page, it gets too long.