Page 1 of 1

multidomains module (error with URL redirect) [SOLVED]

Posted: Fri Jul 08, 2011 7:54 pm
by JackOutoftheBox
I'm now using the multidomains module v.1.5.1 on cmsms v.1.9.4.2, but need some help. It's only partially working, and I'm wondering if I'm doing something wrong here.

Right now, there are three domains for the site:
http://www.abc.com
http://www.def.com
http://www.ghi.com

The latter two (def and ghi) need to go to child pages, and show the child pages in the domain line.

I set up three domains in the domains tab of the multidomains module and then choose their pages. Very easy.

What's working RIGHT is that the domains are showing in the address bar once I choose those pages from my navigation bar. Hooray for that.

However, what's NOT working is when you type in those domains directly into the address bar, it's still taking me to the default home page. Is this a flaw or am I missing something here?

I tried to create domain redirects in the Redirect URLs tab, and they didn't work. I tried to further edit the existing .htaccess file and that just help turning into loops.

here is my .htaccess file code:

Code: Select all

# .htaccess for CMS made simple
RewriteEngine On
RewriteBase /

RewriteCond %{REQUEST_URI} !/$
RewriteCond %{REQUEST_URI} !\.
RewriteCond %{REQUEST_METHOD} !POST$
RewriteRule ^(.*) %{REQUEST_URI}/ [NE,R=301,L]
RewriteCond %{REQUEST_FILENAME} !-f [NC]
RewriteCond %{REQUEST_FILENAME} !-d [NC]
RewriteRule ^(.+)$ index.php?page=$1 [QSA]
# EOF
Can anyone shed some light as to why this isn't working fully? Is there something else I need to do or adjust, or is it a glitch?

Many thanks.

Re: multidomains module (error with URL redirect) [SOLVED]

Posted: Wed Jul 27, 2011 3:07 pm
by JackOutoftheBox
Many thanks to multidomains module creator Andi for the answer to my problem below:
I think the problem is with your config.php. The standard config.php comes with pre-defined root url, which can not work with multiple domains. I'm maintaining a different version of the config.php, which is more flexible and works with multiple domains:
http://dev.cmsmadesimple.org/project/files/711

Please try to use this version of the config.php - you just need to change the MySQL access at the beginning at the file.