Recent Topics

1 Jul 28, 2004 00:26    

On my site, I have multiple blogs that I would like mapped to different folders ( ie. skockination.com/payne, skockination.com/skockie, etc. ). Ideally, the stub files would also be named index.php so that navigating to skockination.com/payne would bring you to the blog rather than having to type out skockination.com/payne/stub.php.

The problem arises when trying to assign those multiple stubs in b2evo.

First, I assign the "Blog Folder URL" to (being generic) /folder1. Then, I set the stub file to index.php. This works perfectly. It can somewhat be accomplished in another way, but doesn't work correctly. This would be done by leaving the Folder URL blank and making the stub file folder1/index.php. This will be important later.

Moving to the next blog, we set the Folder URL to /folder2 and the stub file to index.php. But wait! b2evo doesn't allow different blogs to have the same stub file name; even though they have different folders. Here's where we go back and try to use folder[x]/index.php. This seems to work, except if you have AcceptPathInfo on, anything passed with AcceptPathInfo doesn't work. Ugh.

My first guess is that b2evo prohibits the assigining in code, so I go to the database and attempt to change it there. Foiled again! blog_stub is set to unique. For the fun of it, I remove the unique index and change the blog_stub on all the other blogs to index.php and their folders to their respective locations. Nothing blows up! w00t! Finally, to be thorough, I go back and try to add index.php as one of the blog's names. My first guess looks like it's correct as well! Things seem to be working fine for me otherwise.

Maybe this is something that could be changed in future versions of b2evo. Instead of checking for only a unique stub file, it might be better to check for a combination of Folder URL and stub file.

2 Aug 02, 2004 19:46

This would get tricky if you have more than one blog going through the distributed index.php (as is the default.)

Check out [url=http://forums.b2evolution.net/viewtopic.php?t=1564]this option[/url] to remove the .php from your stub files. Then, you can have a file called "payne.php", and another called "skockie.php". However, the stub in b2evo would just be "payne" or "skockie."

Combine that with extrapath info turned on, and you get permalink urls like: http://skockination.com/payne/2004/08/02/url_title
Isn't that nicer than http://skockination.com/payne/index.php/2004/08/02/url_title?

With Francois's solution, you could even also have a folder called "payne" without causing any conflicts in the URIs! Pretty cool huh? And no need to mess around with b2evo's internals.

(Of course, it requires Apache and mod_rewrite, which might be a dealbreaker.)


Form is loading...