Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

My .htaccess file is as follows:

DirectoryIndex index.php

RewriteEngine On

RewriteBase / 

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

RewriteRule . %1/%2 [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^.*$ index.php?qa-rewrite=$0&%{QUERY_STRING} [L]
RewriteCond %{HTTP_HOST} ^www\.domain\.co\.cc$ [NC]

RewriteRule ^(.*)$ http://domain.co.cc/$1 [L,R=301]

When my website is accessed using the domain.co.cc/ URL it loads. When it is accessed using the www.domain.co.cc URL it does not.

The last two lines of my .htaccess file should redirect users from www.domain.co.cc to the correct domain.co.cc, but it is not working correctly.

Could some help me troubleshoot this?

share|improve this question

2 Answers 2

You don't need rewrite rules for the domain name. This is a DNS level problem, not a problem with the http configuration. You need to check there is an A record for www.domain.co.cc points to the same address as the A record for domain.co.cc

share|improve this answer

What happens if you enter www.domain.co.cc?

Maybe the DNS A-record for www is set to a wrong IP-Address?

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.