Using a different URL for a specific forum category, but not the whole forum.

Started by ElectricSquid, October 22, 2008, 08:59:23 PM

Previous topic - Next topic

ElectricSquid

Here's what I would like to do, please let me know if it's possible.

I would like our existing forum to have it's main URL, as it does right now for all of us. But I would like to use a different, second URL for a specific forum category. That way the forum as a whole, responds to the one URL, but this one specific category (#14) responds to either a second URL, or both URLs.

Most of the forum === http://url-1_main-url.com
Forum category 14 === http://url-2_category-url.com/index.php?action=#14

The issue I face is that my forum is very diverse. We cover a wide array of topics, and cater to a diverse crowd, all under a central theme that brings us all together. But the URL that appeals to one crowd, won't appeal as much to the other that frequents a specific category.

This is an important issue when it comes to forum promoting bumper stickers that users will want to put on their trucks, compared to forum promoting bumper stickers that other users would put on their boats.

I have SMF 1.1.5 running on
Apache 2.2 on
Windows XpPro (tweaked)


Thanks All ;D



ElectricSquid

#1
Oh, I just wanted to add, I have the second URL redirecting to the main URL right now through our DNS service.

But what I really want to do is a little more complicated than a simple redirect. I need the URL for every page in category 14 to change so that every topic in every board in category 14 uses the second URL instead.

It's like having a small, specific forum inside and part of a much larger forum.
In time, I would like to do this for other categories too.

palofdru

"That way the forum as a whole, responds to the one URL, but this one specific category (#14) responds to either a second URL, or both URLs."

you have officially boggled my mind.

I'm not sure how that would work, especially for the login/authentication, it's as if TWO sites would be active at the same time?''

what version of SMF are you using/planning to use?

I dont think a smart redirection based on the URL would work for SMF 2 as it seems to have just the topic id, not the board id, unless you are going to redirect ALL urls and then lookup the topic ID??

would it be simpler (conceptually) to just have two sites?

Your premise seems intriguing but I find it hard to wrap my head around..anymore details?
My best suggestion to you is that you do whatever you feel like doing, for whatever reason you choose to make, without any required explanation nor justification. You probably will, so hop to it!

boo hoo!

ElectricSquid

In a nutshell, url 1 is the main forum. Url 2 is category 14, which is for our yahoo offroading crowd. I'm using SMF 1.1.5 on Apache 2.2

ElectricSquid

#4
Quote from: palofdru on October 23, 2008, 09:58:36 AM
you have officially boggled my mind.

Your premise seems intriguing but I find it hard to wrap my head around..anymore details?


To the best of my knowledge, the most similar thing to what I'm proposing would be mod_rewrite for Apache, but mod_rewrite doesn't handle outbound urls, only inbound, otherwise, I would have just went that route.

Yes, it would be easier to just have two separate sites, but that's not the way I want to do it. The fact is, I'm trying to have multiple sites that all reside under the unbrella of the main site.

If there was a way to host two or more sites that ran from the same database data, that might work. That way the info on each site and the login would be the same, but the url stuff would be different. Not sure if that would work.

RustyBarnacle

You should be able to do it in cpanel.

I have a second domain registered and it points to a different forum on my site so while the real url is www.xxx.com/xxx2  I can use www.xxx2.com to go there and all its pages.

www.xxx2.com/index.php?action=unread redirects to www.xxx.com/xxx2/index.php?action=unread

Its under addon domains in your cpanel.

ElectricSquid


[SiNaN]

Former SMF Core Developer | My Mods | SimplePortal

ElectricSquid

Quote from: [SiNaN] on October 25, 2008, 03:58:53 AM
Maybe this could help you:

http://www.simplemachines.org/community/index.php?topic=158330.0

That's is all I can suggest.

Thanks [SiNaN], I always value your input. You've helped me through a few issues already.

I'm not sure if that mod has the function I need. It does split the forum, but as far as I can tell, it doesn't allow for each part to have it's own url. But I could be wrong on that.
I posted over in that topic to see if it can be done, so we'll see.

I'm open for any other suggestions too.

palofdru

Note: this post will not display until it's been approved by a moderator.

....the more I think about it though, why CANT you run multiple sites???

but then you run into the issue of multiple logins/profiles.. :( unless you do some kind of virtual bridge...


how about......DIFFERENT THEMES FOR EACH "site" BOARD?

That would give you the visual differentiation you seek w/o coding overhead??

I think you are going to have to sit down and FULLY MAP OUT/DOCUMENT ALL the behaviors you wish to see by site/domain/virtual site/board, as half baked approaches will all take a bunch of time to setup and test, but will probably fail as they miss one of the requirements.

Assuming you have ONE forum with ONE user database... or can you have multiple user databases?

you could do a custom bridge which internally rewrites the links?
i.e. newSite.php

which does....

ob_start();

require (/smf/index.php);$out1 = ob_get_contents();


$out2 = ob_get_contents();

$outbuffer = fixUrls( $out); // rewrite urls that reference the old index.php to instead use your custom index.php

ob_end_clean();

echo $outbuffer;



Compression will have to be turned OFF in your SMF config, and you may have to write an integration hook for the Exit function..


That's as far as I can go with this - it was initially an interesting academic exercise, but now it's turning into work :( :P

I suggest you contact Orstio or one of those SMF guys to do something custom for you


My best suggestion to you is that you do whatever you feel like doing, for whatever reason you choose to make, without any required explanation nor justification. You probably will, so hop to it!

boo hoo!

Advertisement: