0

Here is the sample found in numerous posts

RewriteEngine On
RewriteCond %{HTTP_HOST} ^yatko.com[NC]
RewriteRule ^(.*)$ http://www.yatko.com/$1 [R=301,L]

*wanted to rewrite the main domain only leaving the addon/parked domains unaffected - the sample above does not work for some reason.

Yatko
  • 8,715
  • 9
  • 40
  • 46
  • Can you explain what you mean by "does not work?" – elixenide Feb 13 '14 at 20:03
  • Verify whether your `.htaccess` is enabled or not, by putting same garbage (random) text on top of your `.htaccess` and see if it generates 500 (internal server) error or not? – anubhava Feb 14 '14 at 07:05
  • Yes, the htaccess works fine, all other rules work without issues, this is the only one that doesn't. If I use a general rewrite that adds www that one works as well. Only this solution doesn't that includes the domain itself. I was asking if there is any mistake in my sample? – Yatko Feb 14 '14 at 14:46

1 Answers1

1

updated did you set RewriteEngine On on top of the .htaccess ? :

RewriteEngine On
RewriteCond %{HTTP_HOST} !^yatko\.com [NC]
RewriteRule ^(.*)$ http://www.yatko.com/$1 [R=301,L]
ImadOS
  • 425
  • 3
  • 14