Forum Moderators: buckworks & webwork

Message Too Old, No Replies

Domain forwarding issues

         

calypso

10:44 am on Aug 13, 2009 (gmt 0)

10+ Year Member



ok here goes, I have 3 domains:

1. main-site.com
2. subsite1.com
3. subsite2.com

I have a domain forward on both the sub sites that point to the main site.

So when someone visits subsite1.com they are actually forwarded to http: // www. main-site.com/sub-folder/login.php?site=1

The variable passed determines what content is shown and what sub site the user is logging into. The passed variable sets a session variable that is used in the login process.

Problem is the browser doesn't seem to always recognise that there's a variable being passed to it so the login fails.

I should also mention that this forwarding means the subsite is actually in a frameset of the main site, I have no idea if this is the norm but that's what I got with this hosting company.

ok, hope I've explained everything. any help would be greatly appreciated.

Thanks,
Kathy

[edited by: Webwork at 1:05 pm (utc) on Aug. 13, 2009]

HuskyPup

6:18 pm on Aug 13, 2009 (gmt 0)



This sounds very complicated!

Do you have three domains as follows:

eaxmple1.com
example2.com
example3.com

or do you have:

example1.com
subsite.example1.com
subsite.example1.com

If you have example2.com and example3.com why are they pointing at http: // www. example1.com/sub-folder/login.php?site=1 rather than www.example1.com?

Why is there a domain forwarder for a login process? I think I'm missing something here:-(

calypso

3:20 am on Aug 14, 2009 (gmt 0)

10+ Year Member



I have example1.com, example2.com and example3.com.

example2.com forwards to example1.com/sub-folder/login.php?site=2

example3.com forwards to example1.com/sub-folder/login.php?site=3

The reason I did this was so I could use the variable to determine whether the person is visiting example2.com or example3.com.

I tried using http_referrer and other means to determine the URL but because the 2 forwarding sites are being shown within a frameset of the main site I always get the main site's URL returned. does that make sense?

If there is another way to do this without using the variable I'd be extremely happy.

HuskyPup

3:41 pm on Aug 14, 2009 (gmt 0)



the 2 forwarding sites are being shown within a frameset of the main site I always get the main site's URL returned. does that make sense?

It does to me however I've never done anything with framesets therefore would not know if what you require is possible.

Surely you can tell from your own logs which is the referring url?

calypso

3:18 am on Aug 19, 2009 (gmt 0)

10+ Year Member



What logs would they be exactly? Unfortunately I haven't done anything with framesets either so results were a bit unexpected.

Disco Legend Zeke

1:11 pm on Sep 1, 2009 (gmt 0)

10+ Year Member



why not something like a redirection to:

example2.com forwards to
example1.com/sub-folder-2/login.php?

and example3.com forwards to
example1.com/sub-folder-3/login.php?

no variables will be passed,
in fact, you could make login.php the default page, and shorten the address to
example1.com/sub-folder-x/

you can then create any needed variables since you have unique login.php screens. any pages that use the ../folder type address will all function identically, but folders in and below ./sub-folder-x/ will be unique.

calypso

5:36 am on Sep 10, 2009 (gmt 0)

10+ Year Member



the reason I don't use sub-folders is because it's using one set of files and the site variable determines what content to show.