Recent Topics

1 Jun 16, 2006 06:28    

Our site migrated to a new host and I had to fiddle with some of the blog settings. While doing that, I noticed that stub files just flat out will not work on our host for whatever reason. Here's what I was doing, and hopefully someone can tell me what I'm doing wrong.

I made a copy of the a_stub.php, and renamed it to, for example, exampleblog.php, and edited the $blog line to point to the correct blog. Then I uploaded it to our root b2evolution directory, which is "blog". Then I changed the Access Parameter to Other blog through stub file, and the stub name to exampleblog.php. (FYI, I also tried it with this set as simply "exampleblog" without the .php).

Now, if I understand how these work, I should've been able to go to www.domain.com/blog/exampleblog and have the appropriate blog come up. However, that doesn't work.

The only way I could jury-rig this to work was to create a folder in blog called exampleblog, then put a stub file in there called index.php and alter the last line from require(dirname(__FILE__)."/b2evocore/_blog_main.php"); to require(dirname(__FILE__)."/../b2evocore/_blog_main.php"); and set it to other blog through index.php.

Am I doing something wrong, or is there just something weird about my host? Or some kind of .htaccess problem on my main .htaccess file for my whole site?

Because it's not really a big deal. I have it working, but I would PREFER to use stub files if I could get them to work.

2 Jun 16, 2006 07:07

Try going to example.php instead.

3 Jun 16, 2006 07:29

Still doesn't work. I can even go to www.domain.com/example.php and it will pull up the appropriate blog. But www.domain.com/exampleblog doesn't seem to want to work no matter how I mess with the stub files.

I mean, I'm doing it right, right?

If I have a blog, short name exampleblog and I want to have it located at www.domain.com/exampleblog via stub file, the way to do it is to put a stub file (like example.php) in my root b2evolution folder, edit it to point to the correct blog, set the blog to "other blog through stub file" and put "example.php" in the stub filename field right? Because that's what I'm doing, and it just gives me a 404.

4 Jun 16, 2006 08:10

wrabbit wrote:

I mean, I'm doing it right, right?

No, which is why I said go to example.php instead of just example.

you can get domainname.com/index.php/example to work easily, but that's not using a stub file. Using a stub file means you have to tell the browser the file name, thus example.php works. You can trick your server into delivering example.php when someone types in example, but that requires doing stuff in your .htaccess file. I'm not hip to how that all works so I won't even pretend to offer examples of that!

5 Jun 16, 2006 16:15

If I have a blog, short name exampleblog and I want to have it located at www.domain.com/exampleblog via stub file, the way to do it is to put a stub file (like example.php) in my root b2evolution folder, edit it to point to the correct blog, set the blog to "other blog through stub file" and put "example.php" in the stub filename field right? Because that's what I'm doing, and it just gives me a 404.

The error is that you put "example.php" in the stub filename field. Just put "example" and you should get the result you're after. Leave off the .php extension.

Hope that helps...

6 Jun 21, 2006 22:27

Okay, nothing is working. I'm almost positive I'm doing this correctly, and I've honestly done what you guys have said to do. No matter whose instructions I use, no matter what I try, I CANNOT get this to work. So, I'm just going to ask that you guys treat me like a complete mental defective here and please tell me what to put.

My blog installation is located at www.undergroundozarks.com/blog/

I want to have another blog located at www.undergroundozarks.com/blog/example

(NOT /blog/example.php, /blog/index.php/example, or /blog/example/index.php)

What do I need to have my access parameters set as (all the settings)? What do I need to name my stub file? Do I need a sub-folder?

Is there no way to do what I'm wanting without fooling with an .htaccess redirect? I'm so confused. I thought you could do what I'm describing with a simple stub file and a few changed settings.

7 Jun 22, 2006 05:21

Your actual stub file needs to be named example.php and it should be placed in your /blog directory.

For your access parameters:

Preferred access type:Explicit reference to stub file (Advanced): Stub name: example

URL blog name: example

Hope that helps...

9 Jun 22, 2006 06:42

I'm afraid that b2evolution doesn't offer what you're looking for, but there is a trick (other than .htaccess) you can take advantage of. Simply install everything all over again in your new sub-sub-folder and live a happy life.

In other words, and I know this sucks but it's the best you can do right now, copy everything you have in www.undergroundozarks.com/blog/ to www.undergroundozarks.com/blog/example/ then build a 'brand new' blog for your new installation. You would need a new database for it, which would mean a new /blog/example/conf/_config.php file, but it will work.

http://wonderwinds.com is my 'main' installation. http://wonderwinds.com/Hang_Gliding is a secondary installation that I told the main blog is another 'blog'. Truth is it's two different set of files and two different databases. Linking the first to the second was easy since the second is a 'blog' to the first. Linking the second to the first wasn't an issue to me, so it too was easy... It works is the thing.

10 Jun 22, 2006 07:26

I'm not doubting you, but it seems like b2evolution ought to be able to do this. I mean, if the software can mimic subdirectories to make post links prettier-looking (for example, http://undergroundozarks.com/blog/index.php/2006/05/01/kc_urbex_campout), why can't it do the same for a second blog?

Plus, I've seen a post where Nate says he's done this without the use of .htaccess redirects, even though I can't seem to manage it.

If it can't do it, though, I think that's something that should be looked into adding to the software. I mean, I know it's only a minor difference in the URL, but it's easier for non-internet savvy people to remember domain.com/blog/user than it is for them to remember domain.com/blog/user.php.

11 Jun 22, 2006 14:58

Yes, it works currently at http://www.loganelementary.com/student, for example.

The only other guess I have is maybe under the Settings tab you need "Use extra path info" turned on? That doesn't seem directly related, but it's a guess.

I am using version 1.6, so I don't know if that causes any internal differences either....

12 Jun 22, 2006 23:24

Yeah, extra path info is on and always has been. I don't know why it works for you and not me. Weird server settings maybe? At least it's looking like I'm not actively doing something wrong.

I think I'm just going to hack the freaking thing so that I can have more than one stub file named index.php, and then just put them in directories like (blog/example/). That'll have the same effect anyway. I really wish I could do it the way you're doing it, though.

14 Jun 23, 2006 08:36

Well, I got those two to work, but not like yours. For Sertile's, I had to create a directory at blog/sertile/, then I put a stub file called index.php and set it to stub file access.

However, for memorymachine's, because I couldn't have two stub files named index.php, I had to do it a little different. I created a subdirectory at blog/memorymachine/, then I put a stub file in there called index.php, but I had to set the blog to "other blog through index.php." Even though it's not set to stub file access, the stub file still works in there.

I'm thinking about just hacking my blog so I can have more than one stub file named index.php.


Form is loading...