I have a domain at OVH that links to my EC2 instance like this:
http://www.mysite.com –> 12.34.56.78/folder/
So everytime I type “www.mysite.com” in my address bar I end up on my website but the URL has been replaced to “12.34.56.78/folder/”.
I’m currently trying to tweak a .htaccess file at the root of my server but it doesn’t seem to work…
Here is the content of the file:
RewriteEngine on
RewriteCond %{HTTP_HOST} !^www.mysite.com$
RewriteRule ^(.*)$ http://www.mysite.com/ [L]
Maybe I’m not looking at the right solution… Anyway if you can help me, I’ll be grateful!
Cheers,
You are missing a couple of things that I added below