HELP! Globally Change "base" url??
Hi there,
I am developing a site on my hosting and the hosting does everything by domain. (It's annoying :evil: ).
Let's say my site is to be called
"blah.com"
my hosting account had to be called "blah.com" so in order to view it (before the domain is pointed at it)I have a URL like this:
"http://preview.hostingcompany.com/blah.com/index.php"
But because of the way the hosting is set up (this could be my fault) Typolight looks for "http://blah.com/index.php" which doesn't exist.
So basically what I'm asking is there a way in which I can add to the root or base url of the website,
I can do it in the templates for the front end
like <base href="hhttp://preview.hostingcompany.com/blah.com/"> and that works fine as I only have 2 templates.
I starting doing the backend but it looks to me like I'm getting further and further into hacking out code that I will have to change back when the site goes live anyway. Plus the backend stuff ran into problems with referrers and stuff.
Is there a really really simple way of doing this?
I tried looking at the config and localconfig but I couldn't find anything there to edit,
I also tried this line to localconfig:
$GLOBALS['TL_ROOT']='http://preview.hostingcompany.com/blah.com/';
but I don't think I have it right.
Can anyone help me out?
Is there just a setting somewhere I can change rather than messing around with the backend files??
This is urgent so if anyone can help me I'd really appreciate it!
Re: HELP! Globally Change "base" url??
I would say that running install.php will do the trick. Another option (and better IMHO) is to ask your hosting company to set your account now as if your domain was already working (which may be already done) and just use hosts file to change ip address of blah.com to point to your hosting company.
Re: HELP! Globally Change "base" url??
Hi Scare,
Thanks so much for the reply,
I can't run the install.php because it redirects to the non existant place when I log in .
I will look into your second suggestion, cheers.
Re: HELP! Globally Change "base" url??
Try to modify $_SERVER['HTTP_HOST'] and/or $_SERVER['HTTP_X_FORWARDED_FOR'] in your localconfig.php.
Re: HELP! Globally Change "base" url??
Oh Thank you so much that fixed it perfectly,
And I can just delete that one line when I make the site live!
That's brilliant , Thank you thank you thank you!
Re: HELP! Globally Change "base" url??