MU Advanced: Issues and Discussion
Welcome Guest
  • Good afternoon, Guest.
    Please log in, or register.
  • September 03, 2010, 12:39:13 PM
Home Forums Contact Tags FAQ Links News Login Register
* *
Navigation Menu
Search

Random Quotes
If you perceive that there are four possible ways in which a procedure can go wrong, and circumvent these, then a fifth way, unprepared for, will promptly develop.
- Murphy's Law
Pages: [1]   Go Down
  Print  
Author Topic: one blog -- multiple domains  (Read 971 times)
0 Members and 1 Guest are viewing this topic.
ZappoMan
Full Member
***

Karma: 1
Offline Offline

Posts: 157



View Profile
« on: July 01, 2008, 05:59:00 PM »

Is there an easy way to make a single blog respond to multiple subdomains?

In looking at the code is seems like it might work if you had the right rows in the wp_blogs or wp_site tables...

Is there a plugin or hack that supports this?

I'm ok with the URLs being rewritten to go to the primary domain of the blog, but I want the web server to respond to and server both domains.

Thoughts? Does this make sense? Or am I typing crazy stuff again?
Logged

Yep, that's me... riding my bike 204 miles in one day.
Luke
Key Master
*****

Karma: 5
Offline Offline

Posts: 3710



View Profile WWW
« Reply #1 on: July 01, 2008, 06:07:22 PM »

index.php

Meaning: the main one.

Make an array of "answer" domains, do an in_array check against http_host, and redirect to the primary.

All before including blog-header, of course.
Logged

10 frames?
Heh, that's for Quakers.

Note: This message may be Canadian friendly.

"Pornographic monster on the floor"
ZappoMan
Full Member
***

Karma: 1
Offline Offline

Posts: 157



View Profile
« Reply #2 on: July 01, 2008, 06:15:49 PM »

I guess I could do that with htaccess as well...

I understand your suggested solution to be pretty similar.

I guess I could also write a plugin to handle this as well... that basically did the same thing you're suggesting, a redirect before any http body output has occurred.

Thanks.
Logged

Yep, that's me... riding my bike 204 miles in one day.
Luke
Key Master
*****

Karma: 5
Offline Offline

Posts: 3710



View Profile WWW
« Reply #3 on: July 01, 2008, 07:37:53 PM »

I guess I could also write a plugin to handle this as well... that basically did the same thing you're suggesting, a redirect before any http body output has occurred.

That's the problem though.

If you do that, then you have to fire up most of WordPress along with it, just to do a simple redirect.

Why go to the hassle and add in the overhead with it?

Take care of it before any WP files are included, and save the processing power for when its needed.
Logged

10 frames?
Heh, that's for Quakers.

Note: This message may be Canadian friendly.

"Pornographic monster on the floor"
ZappoMan
Full Member
***

Karma: 1
Offline Offline

Posts: 157



View Profile
« Reply #4 on: July 01, 2008, 07:54:14 PM »

Ahh... I get it.

That's why you're suggesting the hack to index.php.

Logged

Yep, that's me... riding my bike 204 miles in one day.
Luke
Key Master
*****

Karma: 5
Offline Offline

Posts: 3710



View Profile WWW
« Reply #5 on: July 01, 2008, 09:02:11 PM »

Now the light is coming on...  Cheesy
Logged

10 frames?
Heh, that's for Quakers.

Note: This message may be Canadian friendly.

"Pornographic monster on the floor"
Tags:

Pages: [1]   Go Up
  Print  
 
Jump to:  


Login
 
 
Recent Posts
Recent Topics
No new topics.
Hot Tags
Whos Online
10 Guests, 0 Users
Home Forums Contact Tags FAQ Links News Login Register