Redirecting without address changing

Hopefully someone will know how to do this. I have a few domains that I've setup to automatically redirect to another directory on my main domain. I've done this mainly so I could own those domains and in some cases I eventually will do something with them. But rather than having them display an error when selected, I have them redirect elsewhere. To do this, I use the following script:

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>domain2.com</title>
<script>
window.location.replace("http://www.domain.com/domain2")
</script>
</head>
<body bgcolor="#FFFFFF">
</body>
</html>
...In this example, I have domain2.com. I want it to redirect any visitors to domain.com/domain2. This works nicely but there is one problem. The address line in the browser will also change to show domain.com/domain2 instead of just domain2.com. Does anyone know how I can modify this script, or use another one, to keep the address line as domain2.com when in fact the visitor is viewing domain.com/domain2?

Most of the time, the visitor is just viewing a page with general information and a full website is not needed. If anyone knows what I need to do to get the address line in the browser to remain the same as the site they entered (in this case domain2.com), that would be great.

Note: I'm using Ensim 3.1.x as my control panel and this option is not a default selection.

I appreciate all feedback regarding this request.

 

 

 

 

Top