Forum Moderators: open
<script language=javascript>
if (location.href=mydomain.biz or www.mydomain.biz)
{location.replace("http://www.mydomain.biz/");}
if (location.href=http://www.mydomain.biz/")
{location.replace(unescape(window.location.pathname)"?home=1");}
</script>
Here is what I am trying to accomplish.
If a user enters 'mydomain.biz' into a browser it sends them to 'http://www.mydomain.biz/' before loading anything else.
---logical place to seperate script into two scripts if need be---
upon reaching 'http://www.mydomain.biz/' I want to attach the current path/filename and the text "?home=1" to the end of the url and redirect to the result.
So after any action on the scripts part the user gets 'http://www.mydomain.biz/%file%?home=1' in their address bar and access to the site.
I can think of several ways of doing this in my head but I can't translate any of it into javascript. using non-absolute paths would be greatly apreciated.