Main Area and Open Discussion > Living Room
Any CPanel Gurus out there?
Carol Haynes:
I have a CPanel account with one main domain registered (say main.com) and two parked domains (parked1.com and parked2.com).
I want to set it up so that if anyone puts any of those three domain names into a browser then the parked1.com domain is visited and the URL changed to reflect the correct URL.
Currently if I put any of the domain names into a browser the website displays properly but with the URL I entered not based on parked1.com?
Any ideas how to achieve this?
I have tried domain redirects (both in the Parked domain section, and the Redirects section) but they seem to have no effect. It may be because I have a .htaccess file which may override redirects (but I don't know a lot about .htaccess to change a complex file).
AndeT1:
I think you actually have to get into the HTML on your main page.<br>In the header area of your default page (index.htm or index.html), but a little JavaScript that looks at the actual page requested and then re-routes the browser to that page.<br>In this way, the user is sent to the page requested, no matter what the main page is named.
or
Change your parked domains to addon domains and you'll get exactly what you want. :-)
Carol Haynes:
So something like this:
--- ---<html>
<head>
<script type="text/javascript">
<!--
if document.domain != "www.parked1.com"
{
document.location = "http://www.parked1.com"
}
//-->
</script>
</head>
<body>
</body>
</html>
This would work if I was using HTML but it is a Joomla based website and this would mean placing this in the template and having it test every time a page is requested.
Is there anyway I can set this up in the .htaccess or in CPanel so that it happens automatically?
AndeT1:
As above:
"or
Change your parked domains to addon domains and you'll get exactly what you want. :-)"
MilesAhead:
I just have the single domain, so I'm not familiar with these other features. But I know there are a ton of .htaccess guides on the web. Many very detailed. Also you might look for a forum by your hosting service. Many times other users will know the exact .htaccess command/feature to point you in the right direction.
Sounds like AndeT1's solution is the simplest. But I can't verify it from my limited experience. :(
Navigation
[0] Message Index
[#] Next page
Go to full version