Page 1 of 1

Excluding localhost from redirecting to www.*

PostPosted: 23. December 2011 03:52
by phptwister
Hello all,

I have modified my .htaccess in order to redirect all visitors to www.mydomain.com when they type in mydomain.com.
This is done because users were able to log in twice into the website, with and without the www prefix.
Code: Select all
RewriteEngine On
   RewriteCond %{HTTP_HOST} !^www.mydomain.com
   RewriteRule (.*) http://www.mydomain.com/$1 [R=301,L]


I have also had my /XAMPP directory password protected, and only accessable from localhost.
Now everytime I want to go to localhost/xampp, I get redirected to www.mydomain.com/xampp, afterwards receiving an "No permission to this dir" error.
What do I have to edit, leave out or add to my .htaccess for this in order to make it work?

Thank you.
Regards, Slish.