Sometimes I just need some tender-loving-care … TLC … in this instance …
Right now, by default, anybody can type DomainName.com – Reserve Your Place In Cyberspace with DomainName.com Domain Name Registration Services! or DomainName.com – Reserve Your Place In Cyberspace with DomainName.com Domain Name Registration Services! to reach the same website. What I want to do is have it so when people type domain.com it will forward them to www.domain.com .
I am basically prepping my way to when people type http:// it will forward them to https://
For both situations above, is there a way to do it at jodohost? Actually, I believe there is a way, but does anybody know how?
Opps, i should mention, that I have done a search and saw a way to do this for Linux, however my account is Windows 
what language are you wanting it in,
i have asp that does this, i use it on 2 of my sites including E:Hosts
apart from that i am not sure
Well, I was hoping not having to use a language and was hoping there was a control panel option or something to do this in
Reason being, I am using a portal that has an index.php in the root directory … hrmm, if it is a simple thing to modify that index.php file to take into account the redirect .. I would have no problem doing that if required 
Domain alias can work or permenent redirect(but not ideal for that)
Hmm, is there any chance you can possibly tell me how to do this via either domain redirect or domain alias? Im at a loss on how to do either for this …
for basically fowarding from any non ssl to https (ssl). Now that ssl is working, thanks guys on that 
oh for forwarding from non ssl to SSL, I’d recommend doing this in code only when it is needed, SSL sites have a significant performance hit(50% at times) over non SSL, so use SSL only when it is needed and for most browsing use non SSL and it will be much more speedy.
Ah, ok, then I would need to do this in the index.php file.
Thanks for the heads up, I’ll do some search on the net to do this in php 
Thanks again!
To force a load from https:// add this to the very beginning of your index.php file:
// Force load from https
if($HTTP_SERVER_VARS["HTTPS"] != "on") {
header("location: https://" . $_SERVER["SERVER_NAME"] . $_SERVER['PHP_SELF']);
}
Tim
My apologies. Besides the SSl, thanks for the answers guys
I also mean if someone typed https://domain.com or even https://domain.com/page …
is there a way to always check to see if they prefixed it with a www., and if they didnt, to add in the prefix? Since w/o the www, plays hell with cookies.
ohhh yes you can do that with code too I have seen it done, but not sure how to do in php, I am sure someone here knows it is acutally very similar to what you have in the example above.
In PHP, you can do this:
[PHP]if(preg_match(“/^yourdomain.com/i”, $_SERVER[‘HTTP_HOST’]) || $HTTP_SERVER_VARS[“HTTPS”] != “on”) {
$queryString= ‘’;
if(!empty($_GET)) {
$queryString= ‘?’;
foreach($_GET AS $var=>$val)
$queryString.= “$var=$val&”;
}
header(“location: https://www.yourdomain.com” . $_SERVER[‘PHP_SELF’] . $queryString.“”);
die();
}[/PHP]
This will redirect and keep intact any querystring variables included in the URL. If there are none, or you don’t care about preserving the querystring variables, you could shorten that to:
[PHP]if(preg_match(“/^yourdomain.com/i”, $_SERVER[‘HTTP_HOST’]) || $HTTP_SERVER_VARS[“HTTPS”] != “on”) {
header(“location: https://www.yourdomain.com” . $_SERVER[‘PHP_SELF’]);
die();
}
[/PHP]
Tim
Thank you, || must be OR in PHP eh? Cool beans
Thank you very much!