fatkatie Posted March 1, 2018 Share Posted March 1, 2018 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. Quote Link to comment https://forums.phpfreaks.com/topic/306701-redirect-domainaurlfile-to-domainburlfile/ Share on other sites More sharing options...
requinix Posted March 1, 2018 Share Posted March 1, 2018 What have you tried? Quote Link to comment https://forums.phpfreaks.com/topic/306701-redirect-domainaurlfile-to-domainburlfile/#findComment-1556806 Share on other sites More sharing options...
Solution fatkatie Posted March 7, 2018 Author Solution Share Posted March 7, 2018 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. Quote Link to comment https://forums.phpfreaks.com/topic/306701-redirect-domainaurlfile-to-domainburlfile/#findComment-1556983 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.