# Vital components of your .htaccess file
RewriteEngine On
RewriteBase /# Force “www.yourdomain.com” instead of just “yourdomain.com”
RewriteCond %{HTTP_HOST} .
RewriteCond %{HTTP_HOST} !^www\.yourdomain\.com [NC]
RewriteRule (.*) http://www.yourdomain.com/$1 [R=301,L]# The Friendly URLs part
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]- Make sure your site is still working… you can still use the same un-friendly URLs after making these edits; you just want to make sure you didn’t misspell something in your .htaccess file and cause it to parse incorrectly.
- Login to the MODx manager (www.yoursite.com/manager) and go toTools?Configuration?Friendly URLs and change the following settings:
* Use friendly URLs: YES
* Use friendly aliases: YES
* Use friendly alias path: YES
!