I was fiddling around with the .htaccess in my web hosting directory, attempting to force HTTPS to my URLs to activate my SSL that comes with Hostgator (which did in fact work), but after changing stuff in there and whenever I try to access my page by simply typing in the URL bar examp.com
the browser automatically adds public_html
after it, which results in a 404, and only when I remove the public_html
part of the URL am I able to access the HTML documents and folders. But if I type https://www.exampe.com
THEN it works properly without adding anything. I was unable to find anything regarding this problem and it happens with every browser.
My .htaccess file looks like this:
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.example.com/$1
Even after removing it the problem persists.
EDIT: The foulder structure is home3/example/.htaccess
EDIT: I should probably mention this, when I originally edited the .htacces
file in the first place it was not present, literally nowhere in my hosting directory on Hostgator, not even after checking "Show dotted files", so I ended up creating it manually and then I started fiddling with the code above.