My b2evolution Version: 1.10.x
I'd like to have URLs like "http://mysite.com/blogs/something/" for my blogs, where "something" is some unique identifier for one of them.
If there's already a good answer for my question (specifically, for the version I'm using, which is 1.10.3) in the forums, please excuse me and point me to that post. All of the posts regarding this topic that I've already read, are outdated and/or have too dirty solutions.
In the past, using version 0.9.2, I found a rather not-so-clean way to achieve this. I set up a different stub name for every blog I had, in the backoffice, and created a directory in blogs/ for each one of them. That directory contained an index.php file which was the actual stubfile. Then I created a .htaccess file in blogs/ which contained the lines:
RewriteEngine on
RewriteRule ^([^/]+)\.php(.*)$ /$1/index.php$2
For all purposes, my URLs were nice: http://mysite.com/blogs/something/ showed the blog which had "something" as stub name, the "something" directory and the "something/index.php" stub file. Also, posts' previews and internal links were working okay.
With 1.10.3, this system is a bit broken. Since the "admin" directory ceased to exist, and the admin.php file appeared in the main "blogs/" directory, now http://mysite.com/blogs/admin.php takes you to http://mysite.com/blogs/admin/, which doesn't actually exist. So, guess what? I tried a new horrible hack. I created a directory called "admin" and created a file called "index.php" into it, with the content:
<?php
include('../admin.php');
?>
(I tried using header('Location: ...') pointing to the admin.php file before, but that didn't work. It caused like a deadlock, since admin.php was redirected to admin/index.php and admin/index.php redirected to admin.php)
Anyway, the backoffice was now visible, but when I tried adding a new category to one of my blogs, an error was displayed. For some reason, index.php is involved in this so index/index.php (which didn't exist yet) was tried to be accessed. Using the same method (creating index/index.php with "include('../index.php')" into it) didn't work this time.
So now I'm looking for a better, cleaner (if possible) solution. If you have any other idea or have solved this problem in a different way, I'd be pleased to read your comment. Thank you.
Uhm... Ok. Seems no one has bothered to make URLs nicer, or my post wasn't tempting enough so as to get one answer at least.
I'd much appreciate to receive a partial response, at least. Anybody had the same problem? How did you solve it? Thank you.