Recent Topics

1 Jul 13, 2005 15:11    

Seems to be solved what is described below. But now I have the index.php in all my permalinks. How can I get rid of it? They look like

http://www.domain.com/b2/news/index.php/2005/07/13/b2evolution_rocks

Thanks!

-----
I got the permalink-thing working in my blog-root-directory. I put following code in my .htaccess-file (found somewhere in this forum)

# Apache configuration for the blog folder


# this will select the default blog template to be displayed
# if the URL is just .../blogs/
<IfModule mod_dir.c>
   DirectoryIndex index.php index.html
</IfModule>


# this will make register globals off in b2's directory
# just put a '#' sign before these three lines if you don't want that
<IfModule mod_php4.c>
   php_flag register_globals off
</IfModule>

# If you're using Apache 2, you may wish to try this for clean URLs:
# AcceptPathInfo   On

I put this .htaccess-file in the root folder, located http://www.domain.com/b2/

But it does not work with my other blog (using a stubfile) located in http://www.domain.com/b2/news/index.php

I put the same .htaccess-file into the news directory but it did not work. I've searched the forum without success

What is it I have to change?

Thanks![/quote]

3 Jul 13, 2005 18:02

Thanks for your reply. I've read this thread and tried the proposed solution without any hell, it's very confusing for a new b2-user

4 Jul 13, 2005 18:09

I would be glad to try and walk you through this. Can you post your url so I can see what you have? And could you also describe what you want the final result to be. Do you have several blogs? Do you want permalinks to look like this:

http://www.brendoman.com/dbc/2005/07/08/gizmo
http://www.brendoman.com/houseofslug/2005/07/04/war_of_the_worlds

I did that using stub files and the link I gave you. If that's what you want, then I can help you set it up. If not, then let me know what you would like and I'll take a crack at it.

5 Jul 13, 2005 18:31

Yes, that's what it should be like. Maybe one should have a simple permalink-guide / tutorial on b2's website because this is something that may be of interest for many other users, too. By now, you have to search through the forums with many proposed and later corrected versions, often not well enough explained for beginners.

I have lots of entries in three blogs in three languages that I want to move to b2. The new blogs are not public yet, I might send you a PM later today or tomorrow. Thanks for your help!

PS: An easy understandable tutorial on permalinks for categories would also be very useful!

6 Jul 13, 2005 21:33

I'm working on a howto for this. Maybe you can help me make sure it's easy to follow. What do you mean by category permalinks?

7 Jul 13, 2005 21:56

I have a problem. The permalink fix I use requires stub files. That works fine for all of our hostee blogs, but the main blog uses index.php in the web root. I haven't found a good way to get rid of 'index.php' from the permalinks of the that blog. That makes me think that this isn't really a fix that's worth writing a howto about. But if you want to use it for your blogs, just create stub files and put them in the web root rather than creating a folder (e.g., news) and putting an index.php stub in it. Make sure you can get to your blog using domain.com/news.php, then go to the .htaccess file in your web root and add this [url=http://forums.b2evolution.net/viewtopic.php?p=19302#19302]code[/url]:

RewriteEngine On

# If we have an .html file for the bare subject (no extra path, no query string), use it:
RewriteCond %{REQUEST_FILENAME}.html  -s
RewriteCond %{QUERY_STRING}  ^$
RewriteRule ^(all|blog|linkblog|click)/?$  $1.html

# If the subject/extrapath does not match an existing file, call b2evo!
RewriteCond %{REQUEST_FILENAME} !-s
RewriteRule ^(all|blog|linkblog|click)(/.*)?$  $1.php

Where it says (all|blog|linkblog|click) you'll want to put the names of your stub files (leave off the .php). This rewrite code basically says that if a browser asks for domain.com/news, it will serve news.php. So try it in your browser. If domain.com/news shows your blog, then go into the backoffice and remove the .php from the name of your stub file. Now your permalinks should be nice.

9 Jul 13, 2005 22:01

I know other people have asked about that, but I haven't seen any solutions for it yet. By the way, I think the upcoming major update to b2evolution will do a much better job of handling urls, permalinks, etc. This hack may not be necessary after the new version is released.

10 Jul 13, 2005 22:48

Ok, then let's wait for the next release. This is something that is much better handled by Wordpress in the admin-interface. Takes less than three minutes and it works - even the .htacess is created automatically. Have tested it tonight and using different categories for different blogs might be a workaround for not having multiple blogs in Wordpress

11 Jul 13, 2005 22:53

Yes, that would probably work just fine. Keep in mind that most users probably don't pay any attention to your permalinks, and when they do, the index.php in the middle may not bother them at all.

12 Jul 13, 2005 23:13

Yes, you might be right. But search engines do. And most important - the links are really permanent (at least the categories) in case I should move to another blog script (one never knows). Right now with my old and simple blog script, my permalinks are like index.php?id=42af43a9a5c9a

13 Jul 17, 2005 13:45

Isaac has done it, but it was too much hassle for me to bother with. And as far as I'm aware (we did SEO in one of my modules at university), google and the other major search engines don't put as much emphasis on the actual url, but rather the link pointing at the url and the content on the page.

Anyway, if you really feel the need to do it, here's how

http://isaacschlueter.com/blog/clean_category_links


Form is loading...