This is what i have that will not work:
RewriteEngine on
Options +FollowSymlinks
# redirect to WWW
RewriteCond %{HTTP_HOST} ^([a-zA-Z0-9\-]*)\.com$
RewriteRule ^.*$ http://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
# If path does not end in "/"
RewriteCond %{REQUEST_URI} !/$
RewriteRule ^.*$ http://%{HTTP_HOST}%{REQUEST_URI}/ [R=301,L]
# Load the index
RewriteRule ^(.*)/$ index.php?p=$1 [NC,L]
For some reason, the last line will make the page redirect (like i have a [R]), so the browser will go:
www. site . com / index.php?p=variable
instead of going to:
www. site . com/variable/
Cheers.