0

For some odd reason when I visit my site without the "www." it redirects properly. However when I try to visit mywebsite.com/test.php it will redirect to mywebsite.com/public_html/test.php.

For some odd reason it adds "public_html" to the redirect breaking the page

My .htaccess is on the same level as the public_html place. Below is the code im using in the .htaccess file.

RewriteEngine on
RewriteCond %{HTTP_HOST} ^mywebsite\.com [NC]
RewriteRule ^(.*)$ http://www.mywebsite.com/$1 [L,R=301,NC]
Emanuel
  • 79
  • 3
  • 3
  • 13
  • Possible duplicate of [Redirect non-www to www in .htaccess](http://stackoverflow.com/questions/12050590/redirect-non-www-to-www-in-htaccess) – inye Oct 26 '16 at 02:34
  • @inye I tried the solution on that page and it still gives me the same issue. – Emanuel Oct 26 '16 at 02:39

0 Answers0