Trying to set up a 301 redirect to forward all www traffic and subdomain traffic to domain.com
RewriteEngine On
RewriteRule ^/?wiki/(.*)$ /w/index.php?title=$1 [PT,L,QSA]
RewriteRule ^/?wiki/*$ /w/index.php [L,QSA]
RewriteRule ^/*$ /w/index.php [L,QSA]
RewriteRule ^(.*\.(css|js))$ min/index.php?f=$1&debug=0 [L,NC]
RewriteCond %{HTTP_HOST} !^domain\.com
RewriteRule (.*) http://domain.com/$1 [R=301,L]
Is from my htaccess file - can't for the life of me how to work out how to get the 301 to work properly.
At the moment www.domain.com/wiki/Main_Page redirects to domain.com/w/index.php/Main_Page
I'm sure it's something simple !