Reputation: 35276
I have a rule in my htaccess file to remove a www subdomain like so:
<IfModule mod_suphp.c>
suPHP_ConfigPath /home/myusername/php.ini
<Files php.ini>
order allow,deny
deny from all
</Files>
</IfModule>
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.mysite\.com [NC]
RewriteRule ^(.*)$ http://mysite.com/$1 [L,R=301]
When I try to go to www.mysite.com it tries to send me to http://mysite.com/public_html/
What's causing this and how would I fix it? If it helps I'm using a shared hosting plan on hostgator.
Upvotes: 0
Views: 67
Reputation: 10888
IIRC, the HostGator document root for userX
is /home/userX/public_html
, not /home/userX
, so the symptoms that you are describing are what I'd expect unless of course your trying to do go to /home/userX/public_html/public_html
which might be an artefact of not specifying a
RewriteBase /
After the RewriteEngine On
Upvotes: 2