0

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?

4

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

0

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

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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