How can I use mod rewrite to rewrite my URL. I want my URL to look like this
http://www.whatever.com/links
Not
http://www.whatever.com/links.html

Please, be VERY detailed.

Mod_rewrite is an Apache module that can be controlled by the .htaccess file in your root directory.

Create .htaccess file in your root directory (note, that there is no file name, than there is a dot, and htaccess is the file extension). If you have an .htaccess file already in your directory just paste this in:

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ $1.html [L,QSA]

That would change whatever.com/links.html to whatever.com/links/.

RewriteEngine On turns the rewrite engine on. :-)

RewriteCond %{REQUEST_FILENAME} !-f – if requested filename is not an exisitng file…
RewriteCond %{REQUEST_FILENAME} !-d – and if requested filename is not an exisitng directory…
RewriteRule ^(.*)/$ $1.html – catch everything before the trailing slash into the variable $1 and replace filename with $1.html.
L – this rule is last.
QSA = Query String Appended (“pass through” existing query strings).