JavaScript: can I get the full url including the domain, the filename and the protocol?
<p>I am sure this should be possible but when I look at google, all it tells me is how to get the filename and stuff, I don't want this.</p>

<p>I am looking for this because I use Weebly as my webhost and it only allows for .html files - when you click "Home" you are brought to /index.html and when you open the site there isn't  a /index.html.</p>

<p>What would be a plus is if I can add (using an if statement of course) JS that redirects if the site's url == <a href="http://kingdomofmuqtasid.weebly.com/index.html" rel="nofollow">http://kingdomofmuqtasid.weebly.com/index.html</a> and points the body to: <a href="http://kingdomofmuqtasid.weebly.com" rel="nofollow">http://kingdomofmuqtasid.weebly.com</a>.</p>

<p>PS: can the code be placed <em>inside</em> the body?</p>
