Recent Topics

1 Jan 12, 2008 23:05    

My b2evolution Version: 2.3.x

Hello,

I installed b2evo 2.3 in /blog/
So the URL of the blog is www.mysite.com/blog/ and a permalink is www.mysite.com/blog/index.php/2008/01/08/post-title
All is working.
Now I want to remove /blog/index.php from the URL.
I do not want to install b2evo in the root of the hosting if there is an other solution.
What I have to do for this ?

I red http://forums.b2evolution.net/viewtopic.php?t=13863
http://waffleson.co.uk/2007/10/multi-domains-on-a-single-evo-install
http://www.masonworld.com/computer/b2evo/running-b2evolution-multiple-blogs-multi
http://forums.b2evolution.net/viewtopic.php?t=13575
http://manual.b2evolution.net/Appearance_of_my_permalinks

But I didn't find a solution to removed /blog/index.php from the url
I'm running apache 1.3.x with php5

2 Jan 12, 2008 23:17

My b2evolution Version: 1.10.x

Hello,

I used http://manual.b2evolution.net/Appearance_of_my_permalinks to create a new .htaccess.

 RewriteEngine On
 
 # Redirect anything that's not an existing directory or file to index.php
 RewriteCond %{REQUEST_FILENAME} !-d
 RewriteCond %{REQUEST_FILENAME} !-f
 RewriteRule ^  index.php

Now both URLs are working(w/ and w/o index.php)
http://daury.net/index.php/2008/01/01/bonne_annee_a_toutes_et_a_tous
http://daury.net/2008/01/01/bonne_annee_a_toutes_et_a_tous

If you browse the [url=http://daury.net/]blog[/url], you will see that all urls contain index.php. What I have to do to remove it ?

3 Jan 12, 2008 23:41

Set the blog to absolute url http://domain.com/ to get rid of index.php, use htacces to rewrite to /blog/index.php ;)

¥

4 Jan 12, 2008 23:47

Hi Slamp, I answered you on your other post, I'll merge these two ;)

¥

5 Jan 13, 2008 22:56

In fact, I got 2 problems on 2 differents blogs.
Anyway for the first one (remove /blog/index.php):
- I created a stub file on the root, I used a_stub.php template. I renamed it to index.php, then I edited it and change only one line

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


- In backoffice I setted the blog to absolute url http://www.domain.com/
- I added to both .htaccess (in / and /blog)

RewriteEngine On
RewriteBase /
RewriteRule ^blog/(.*)$ /$1 [R=301,NC,L]

# Removed index.php in URLs
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^  index.php

- I removed all cookie for www.domain.com

Now the blog is available on http://www.domain.com/
/blog/index.php/ seems removed when I click on a category or on a permalink
BUT authentification is not working. I mean I need to login multiple times, sometime I'm log out when I edit a post. I'm not able to post a comment :/
What I'm doing wrong ? :'(

6 Jan 14, 2008 00:36

This is gonna be a cookie problem. In conf/_advanced.php or _admin.php, one of the files , set
$instance_name = 'free_me_from_my_woes'; // MUST BE A SINGLE WORD! NO SPACES!!

( their caps :| )

It'll force it to use a new set of cookies, you'll need to login again, but after that it should stick

¥

7 Jan 14, 2008 12:10

That was a cookie problem. The cookie path was /blog/ instead of / . Thanks Yabba for the idea.
I changed in conf/_advanced.php

//$cookie_path = preg_replace( '#https?://[^/]+#', '', $baseurl );
$cookie_path = '/';


Form is loading...