Altering .htaccess file

1 replies
I have a wordpress blog. If I put this code it prevents duplicate content problems with www vs no www in front of my website.

But once I put the code into .htaccess then if i enter mydomain.com - I get a 500 error. Is that what I WANT to happen? Or is this code wrong?


Options +FollowSymlinks
RewriteEngine on
rewritecond %{http_host} ^MYDOMAIN.com [NC]
rewriterule ^(.*)$ http://www.MYDOMAIN.com/$1 [R=301,NC]

Thanks!
#altering #file #htaccess
  • Profile picture of the author saschakimmel
    I just tried the config on my own server - I don't get the error so the syntax is correct.

    Maybe your webserver does not support Apache's rewrite module (mod_rewrite) ? You can't fix that yourself - only your provider can.

    You should have a look at your logfile.
    Signature

    ** Get my ViralListMachine software now for free and build your own list virally by giving away free stuff @ http://www.virallistmachinegiveaway.com **

    {{ DiscussionBoard.errors[1908834].message }}

Trending Topics