Rewriting URLs with .HTACCESS file


Below is my personal .htaccess file to rewrite static html and php files to more meaningful, SEO-oriented links. Feel free to use it and extend according to your needs.

Enjoy!

 

 

 

 

Options +FollowSymLinks

RewriteEngine On
RewriteBase /
## Error pages.
ErrorDocument 404 /not-found.html
## Canonical Urls
RewriteCond %{HTTP_HOST} ^yoursite.com.au$ [NC]
RewriteRule ^(.*)$ http://www.yoursite.com.au/$1 [R=301,L]
## URL Re-Writes
RewriteRule ^about-us/$ /about.html [L]
RewriteRule ^services/$ /services.html [L]

About DENIS

Denis is a freelance web designer in Sydney NSW. He has worked with many Australian-based clients since 2008 on a variety of projects: bespokes application development, User Interface Usability and IT project management. In his free time, Denis tends to behave erratically unless someone's offering beer.