Excluding localhost from redirecting to www.*

Problems with the Linux version of XAMPP, questions, comments, and anything related.

Excluding localhost from redirecting to www.*

Postby phptwister » 23. December 2011 03:52

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.
Posts: 7
Joined: 17. December 2011 23:43
Operating System: Ubuntu 11.10

Return to XAMPP for Linux

Who is online

Users browsing this forum: No registered users and 7 guests