Jump to content

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


Go to solution Solved by 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.

 

  • Solution

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. 

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.