This is the first that that I worked with the htaccess file because I wanted to keep the easy way of GET variables and make the url nice. So I have the following code in my .htaccess file.

So the following URL: should 'direct' to

When not using the second condition which does the GET stuff, it works (remove the www). What am I doing wrong?

RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^ [NC]
RewriteRule ^(.*)$$1 [L,R=301]

RewriteCond %{REQUEST_URI} act/(.*)/
RewriteRule ^act/(.*)/$$2

AuthGroupFile /dev/null
AuthType Basic
AuthUserFile /home/*CENSORED*/domains/
AuthName "Administrators' Area"
require valid-user

<FilesMatch "\.php$">

AddHandler x-httpd-php53 .php

The FilesMatch I had to setup to use PHP 5.3 on my webhost that I rent.