Forum Moderators: phranque

Message Too Old, No Replies

redirecting from www to non-www for cgi-bin

what am i doing wrong?

         

rbacal

5:41 am on Mar 22, 2006 (gmt 0)



Trying to redirect to non-www for my entire site, and using the following:

Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www.yoursite.com [NC]
RewriteRule ^(.*)$ [yoursite.com...] [L,R=301]

This appears to work for my http directory, but not for the cgi-bin. It just occurs to me that the .htaccess file is in the httpdocs directory. I tried to create in in root but it appears I don't have permissions to do this. Could that be the problem?

Suggestions?