Recent Topics

1 Apr 10, 2008 23:34    

My b2evolution Version: Latest version as of 4/10/2008

Hey guys, I'm new to using b2evolution, and so far it looks pretty great. However, I'm having trouble getting pretty urls to work, like date urls (root/10/20/2008/post) and category permalinks (root/category/post). Basically, the admin control panel gives me the correctly formatted url as a link, but going there results in a 404.

I think the problem stems from my using a "relative to baseurl" path for the base of the blog. I have a stub index.php in that relative directory (so I can simply link a directory as the main page of the blog) which I had to modify slightly in order to get it working.
I changed this line

require_once dirname(__FILE__).'/conf/_config.php';


to this line.

require_once dirname(__FILE__).'/../conf/_config.php';

That seemed to work just fine for the main pages, but, as I've stated, links to individual posts don't work. I've also tried renaming and uncommenting that default .htaccess that comes with b2evolution, but it didn't seem to do any good. Any ideas?

Thanks

4 Apr 11, 2008 03:54

Sorry, I'm just testing things out right now on my local machine, I haven't set anything up online yet. I haven't decided on a host yet, but I'm currently testing with the latest apache and php version (and I assume I'll be using apache wherever I decide to host anyway). Is there any other information I can give you?

Thanks

5 Apr 11, 2008 17:19

Can you give me your exact Apache version?

Otherwise, I would suggest you try renaming sample.htaccess to .htaccess and check the settings therein. To me it looks like your apache doesn't have the setting that allows it to process extra path info by default.

I don't know the magic setting from the top of my head since it generally works by default (and it certainly does with all the hosts we have tested in the [url=http://b2evolution.net/web-hosting/]Hosting section[/url]).

6 Apr 12, 2008 10:07

My Apache version is 2.2.8, and I've already changed the sample.htaccess to .htaccess and uncommented all lines (lines that contained directives, that is), but to no avail. Do you know of some other settings I might be missing, or does the one of the RewriteConds or the RewriteRule need to be modified to accomodate the relative to baseurl setup?

Thanks

7 Apr 24, 2008 15:43

I have the same troubles as kummabal and I use apache version 2.2.3
Kummabal, do you have the solution yet?

8 Apr 24, 2008 15:48

Here more information about the server:
CentOS 5
php 5
apache 2.2
b2evolution 2.4.1

9 Aug 29, 2008 13:13

hi there,

I had a similar problem:
Main blog installed in root-directory / and a second blog with a stub in a subdirectory /subdir/.

Loading / and /subdir/ worked fine, but loading /subdir/2008/08/29/post didn't. It always showed the default Blog in the root directory and gave an error as it didn't find the post.

I also have all the directives in .htaccess commented out to remove the index.php from the URLs.

So, b2e didn't find out which blog I was trying to load.

What I did was add the following to /index.php (line 66, before if( empty($blog) )):

	if( preg_match( '#^/([^/]+)/#', $ReqPath, $matches ) )
	{ // We have an URL blog name:
		$Debuglog->add( 'Found a potential URL blog name: '.$matches[1], 'detectblog' );
		if( (($Blog = & $BlogCache->get_by_urlname( $matches[1], false )) !== false) )
		{ // We found a matching blog:
			$blog = $Blog->ID;
		}
	}

It now also parses the path in an URL without index.php in it and takes the first part of the path as the blog name.

/subdir/2008/08/29/post -> subdir

I don't know if there's a more elegant way to solve this (i.e. without having to change a core file), but it seems to work. Posts from the subdir-Blog are now loaded correctly :-)

10 Jan 05, 2009 12:36

Hi - I am having the same problem - my "pretty" urls used to work- I set them up for SEO reasons... my blog root works -

http://www.searchgap.com/blog/ - but none of the post urls work - e.g.
http://www.searchgap.com/blog/seo-predictions-for-2009

This only happened recently and I think due to a change on the hosting company servers because my blog was previously working fine - but I checked with them and they say their servers are fine and it is my script.

I have the original sample.htaccess file in place.

My settings in URLS tab are...
Use extra-path: post titleE-g: http://www.searchgap.com/blog/post-title

Any ideas?

11 Jan 05, 2009 13:12

If it worked before your hosts changes then it pretty much indicates that it's their changes that have killed them.

You need to sort this with your host no matter how much they blame the script ;)

¥

12 Jan 05, 2009 13:18

Thanks a lot !!! - Actually I just this minute (after about 5 hours of experimenting) found the problem... My host seems to have duplicated my complete website (including my blog) inside my blog folder which I did not notice before. I deleted it - re-uploaded the htaccess files for both root and blog folders and it is working again.
Thanks for taking the time to reply :)


Form is loading...