Hi, I'm using phpLinkBid and it has own htacces but I wanna add to this htaccess one rule which redirects from domain.com to www.domain.com This is my htaccess after added two lines to the end: # Enable mod_rewrite engine RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*) index.php RewriteCond %{HTTP_HOST} ^domain.com$ [NC] RewriteRule ^(.*)$ http://www.domain.com/$1 [R=301,L] Code (markup): It works but just for domain without any opened page, when I'm trying to open domain.com/anything.php it opens just www.domain.com/index.php Please how to get it work? thanks a lot...
RewriteCond %{HTTP_HOST} !www\.domain\.com$ [NC] RewriteRule ^/?(.*)$ http://www.domain.com/$1 [R=301,L]
That won't make a difference froggy. domain.com/anything.php to www.domain.com/index.php is the correct behaviour as the first rule is redirecting everything to index.php i.e.: Request: domain.com/anything.php First rule: domain.com/index.php Second rule: www.domain.com/index.php