Forum Moderators: phranque
I'm working with my own webserver and i got many domains stacked on it. Everything works but I'm searching for 2 things:
1)If I surf to domain.tld I want it to point to [url...] (the url is on another server).
2)If I surf to domain.tld I want it to point to [url...] (the url is on another server) and the browser-window still says that you're at domain.tld.
Maybe I can do this with .htaccess? but how then? or is there a unixprogram for this?
tnx in advance
"To mirror or not to mirror"
[webmasterworld.com...]
It involves setting up your server as a mirror using the .htaccess file - you probably also need the "Dynamic Mirror" solution.
/claus
1)If I surf to domain.tld I want it to point to [url...] (the url is on another server).
Basic redirect - use .htaccess to do it or even a meta redirect if you don't want to mess with .htaccess
2)If I surf to domain.tld I want it to point to [url...] (the url is on another server) and the browser-window still says that you're at domain.tld.
It requires frames, there's no other way to get around it - it's a presentation issue at the client side so .htaccess can't help you here.
Trying to use domain.tld > domain2.tld/~mydir/ will cause you all manner of frame related problems so it might be worth considering alternatives.
- Tony
Maybe someone has got a tutorial or a documentation that is just for this type of problem?
I understand a very bit the .htaccess stuff but DUDES! :) That htaccess is voodoo! :)
I also understand php very well, maybe I can do the second part with that?
So can someone please help me by giving me an example or an url or somethin'?
Tnx
greetz
Check out our extremely cool charter [webmasterworld.com], the part about we'll help ya with your homework but not do it for ya is what's happenin' here.
One of our homies may get down and do your homework for ya, but if not, here's [webmasterworld.com] a righteous little .htaccess tutor. Hit the books Dood! :)
Dreamquick:
>> there's no other way to get around it
I'll challenge that. There are always more than one way of doing things (see below). I agree that using frames is the easiest solution here, and i'll even post...
... the code for dieselboy (just put this in the index.html file of "domain.tld" and forget about the htaccess stuff for now, there's too much to read and this will get you running in five minutes):
<FRAMESET>
<FRAME SRC="http://url/map">
<NOFRAMES>
For a no-frames version click <a href="http://url/map">here</a>.
</NOFRAMES>
</FRAMESET> The trick is the P flag, that's shorthand for throughput proxy:
RewriteEngine on
RewriteBase /~quux/
RewriteRule ^hotsheet/(.*)$ [tstimpreso.com...] [P]
With this in the address line of the browser:
1) http // www.your-domain.tld/~quux/hotsheet/page.htm
...you will now see the content that is here (on another domain):
2) http // www.tstimpreso.com/hotsheet/page.htm
-just add water, and please note that option #3 above ("CSS") spans a very large set of possible ways to do this kind of thing ;)
/claus