3 domains, 1 gallery

simpat1zq

Joined: 2007-01-31
Posts: 12
Posted: Tue, 2010-03-16 15:19

OK, while I was typing this, I think I figured it out. (The stuff below the + signs is what I had typed up for reference) I basically just bypassed the index.php, and created an index.php with the following code:

<meta HTTP-EQUIV="REFRESH" content="0; url=./main.php">

It seems to work. That won't screw anything up, will it? The index.php just seemed like a simple redirect, so I just replaced it with a simpler one, but I'm not really sure if it's doing anything funny behind the scenes.

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

I have 3 domains, let's say domain1.com, domain2.com, and domain3.com

I use Dreamhost, and have domain2, and domain3 mirrored to domain1. I have gallery installed at domain1/pictures.

But, if I go to domain2/pictures or domain3/pictures, index.php redirects me to domain1/pictures/main.php.

If I go to domain2/pictures/main.php or domain3/pictures/main.php, it keeps on the domain I entered with. It's not a big deal, but is there any way I can have index.php keep the user on the domain name they entered with?

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Tue, 2010-03-16 15:35

Well, if things start going screwy, you know where to look :)

Looks to me like index.php that ships with G2 is doing more than "simple redirection". Looks like it's initializing and loading some stuff to me.

Check into using a simple redirect in .htaccess Here's a quick tutorial on that:
http://kb.mediatemple.net/questions/242/How+do+I+redirect+my+site+using+a+.htaccess+file%3F
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Tue, 2010-03-16 15:43
Quote:
is there any way I can have index.php keep the user on the domain name they entered with?

Yes.

Make sure the baseUri setting in your config .php is left empty - ''

G2 is 100% url-neutral, it simply uses the entire url that's used to reach main.php to build its urls from, keeping the existing protocol, hostname and directory portion unchanged, unless you tell it otherwise. You can therefore access the same G2 installation on as many different urls as you can arrange to point to the same directory.

 
simpat1zq

Joined: 2007-01-31
Posts: 12
Posted: Tue, 2010-03-16 15:56

Thanks alecmyers, your way worked.