Jump to content

2 Domains , 2 Sections


madprocessor
 Share

Recommended Posts

Hi there,

I think it is a quite simple Question.

My Page has 2 sections, and can be accessed by 2 Domains.

It should automatically redirect to a section by domain

How can I achieve the following setup:? 

domaina.com -> domaina.com/asection

domainb.com -> domainb.com/bsection

Thanks for any help

Joerg

Link to comment
Share on other sites

@LostKobrakai

Code checked? Endless redirect? What about subpages in the tree?

Better solution: http://modules.processwire.com/modules/multisite/

could not test from here:

if($config->httpHost == "domaina.com" && substr($page->url,0,10) == '/bsection/') {
   $session->redirect('/asection/'.substr($page->url,10));
} else if($config->httpHost == "domainb.com" && substr($page->url,0,10) == '/asection/') {
   $session->redirect('/bsection/'.substr($page->url,10));
}
Edited by kixe
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...