cleanUrl with htaccess

Configure the htaccess file to make work cleanUrl

cleanurl will write url names like this one:

instead the default with the clasical ?q=


To configure it I've made this changes in the .htaccess file



RewriteBase /Home_Root_Folder
# Rewrite URLs of the form 'x' to the form 'index.php?q=x'.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !=/favicon.ico
RewriteRule ^(.*)$ /index.php?q=$1 [L,QSA]



I've also added a slash (/) before the index.php

To get the Home Root Folder value it might be something like: /www/var/my_site

Check on your hosting parameters because you must have access to htaccess.


Do activate Global Redirect to avoid duplicated content!


It works!