Jump to content

Redirect domainA:url/file to domainB:url/file


fatkatie

Recommended Posts

I just started my apache rewrite/redirect/...  (apache ... what's apache? - not quite that bad)  quest and have one basic question.  Here are some parameters.

 

I have a site that serves 4 domains, a, b, c, d.  The php files behave in different ways depending

on the host seen.  Primarily this is just image branding.

 

Yesterday, sites a, b, c, and d were not secure.  We have purchased a certificate for d and https

now functions properly at that "site".

 

Now what I want to do is redirect a, b and c to d, but only when these 3 try and access a certain file - which

is administrative in nature.   All these administrative files have been moved into another folder.

 

So, when http://a.com/washpanel.php is accessed, I want to operate here https://b.com/admin/washpanel.php, and I want the visitor to see that in the location box.

 

-> Can it be done?

 

  I'm working on this now with lots of permutations in htaccess, but it's not working.  Any

suggestions would be appreciated. 

 

I have found examples of /path/path to domain/path, but not domain/path domainB/path.

 

Thank you.

 

Link to comment
Share on other sites

We gave it up.  We decided to use let php scripts select the appropriate protocol.  So in a file with a redirect or menu, the entire URL is defined.. https://..... or http://.   Each script always validated the user, now it validates the the protocol too (using the same function that builds the URLs.  I'm sure that's not the way to do it... but it's done. 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.