migration able2know phpBB SEO mixed mod rewrite

Discussions and support about the different URL Rewriting techniques for phpBB2.

Moderator: Moderators

migration able2know phpBB SEO mixed mod rewrite

Postby asiaexpat » Fri Aug 04, 2006 4:41 am

Hello

I previously installed the able to know rewrite but something has gone wrong--manybe about the stripping of sids.
my urls for forum posts look something like this

.com/phpBB2/post-14215.html#14215

or this
com/phpBB2/about1558-0-asc-45.html

and sometimes will have a long sid code after the .html

I think I want to redo this whole thing and get it right
asiaexpat
PR1
PR1
 
Posts: 121
Joined: Fri Aug 04, 2006 4:29 am

Advertisement

Postby dcz » Fri Aug 04, 2006 10:18 am

And Welcome :D

A link would quite help out here to understand better.

So you previously used the able2know method and changed to on of the phpBB SEO ones ?

Previously your post links looked like this : post-14215.html#14215
and now they look like this : post14215.html#14215 ?

Same for topics the old about1558-0-asc-45.html.

for the post, the robots.txt should disallow both, for the about => topics, if you are using either the simple or the mixed mod rewrite, you can http 301 redirect those, if advanced, you should disallow the old "about" urls in your robots.txt.

When the zero dupe will be out, we won't have these problems any more ;)

++
Useful links :
SEO Forum || SEO Directory || SEO phpBB || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Recherche
dcz
Admin
Admin
 
Posts: 21424
Joined: Fri Apr 28, 2006 9:03 pm

Postby asiaexpat » Fri Aug 04, 2006 10:55 am

No I just applied the able to know mod. But I might have done something wrong

http://www.asia-expatsforum.com



-but some of the phpbb2 updates required changing the sessions.php file and i could not find the code to change. I would like to start out from scratch.

i wonder if i can just overwrite my sessions .php with the new 2.021 version--and then sdo the mixed rewrite mod

seems like my .htaccess file has been compromised-only shows this now
RedirectMatch temp ^/$ http://www.asia-expatsforum.com/phpBB2/portal.php


my robots looks like this
Code: Select all
User-agent: *
Disallow: /phpBB2/admin/
Disallow: /phpBB2/images/
Disallow: /phpBB2/includes/
Disallow: /phpBB2/language/
Disallow: /phpBB2/templates/
Disallow: /phpBB2/common.php
Disallow: /phpBB2/groupcp.php
Disallow: /phpBB2/memberlist.php
Disallow: /phpBB2/modcp.php
Disallow: /phpBB2/posting.php
Disallow: /phpBB2/profile.php
Disallow: /phpBB2/privmsg.php
Disallow: /phpBB2/viewonline.php
Disallow: /phpBB2/faq.php
Disallow: /phpBB2/updates-topic
Disallow: /phpBB2/stop-updates-topic
Disallow: /phpBB2/ptopic
Disallow: /phpBB2/ntopic
Disallow: /post-
asiaexpat
PR1
PR1
 
Posts: 121
Joined: Fri Aug 04, 2006 4:29 am

Postby asiaexpat » Fri Aug 04, 2006 11:03 am

i just found teh correct .htaccess file on my c drive

should i upload to server it contains the following

Code: Select all
RedirectMatch temp ^/$ http://www.asia-expatsforum.com/phpBB2/portal.php

RewriteEngine On
RewriteRule ^forums.* index.php [L,NC]
RewriteRule ^post-([0-9]*).html&highlight=([a-zA-Z0-9]*) viewtopic.php?p=$1&highlight=$2 [L,NC]
RewriteRule ^post-([0-9]*).* viewtopic.php?p=$1 [L,NC]
RewriteRule ^view-poll([0-9]*)-([0-9]*)-([a-zA-Z]*).* viewtopic.php?t=$1&postdays=$2&postorder=$3&vote=viewresult [L,NC]
RewriteRule ^about([0-9]*).html&highlight=([a-zA-Z0-9]*) viewtopic.php?t=$1&highlight=$2 [L,NC]
RewriteRule ^about([0-9]*).html&view=newest viewtopic.php?t=$1&view=newest [L,NC]
RewriteRule ^about([0-9]*)-([0-9]*)-([a-zA-Z]*)-([0-9]*).* viewtopic.php?t=$1&postdays=$2&postorder=$3&start=$4 [L,NC]
RewriteRule ^about([0-9]*)-([0-9]*).* viewtopic.php?t=$1&start=$2 [L,NC]
RewriteRule ^about([0-9]*).* viewtopic.php?t=$1 [L,NC]
RewriteRule ^about([0-9]*).html viewtopic.php?t=$1&start=$2&postdays=$3&postorder=$4&highlight=$5 [L,NC]
RewriteRule ^mark-forum([0-9]*).html* viewforum.php?f=$1&mark=topics [L,NC]
RewriteRule ^updates-topic([0-9]*).html* viewtopic.php?t=$1&watch=topic [L,NC]
RewriteRule ^stop-updates-topic([0-9]*).html* viewtopic.php?t=$1&unwatch=topic [L,NC]
RewriteRule ^forum-([0-9]*).html viewforum.php?f=$1 [L,NC]
RewriteRule ^forum-([0-9]*).* viewforum.php?f=$1 [L,NC]
RewriteRule ^topic-([0-9]*)-([0-9]*)-([0-9]*).* viewforum.php?f=$1&topicdays=$2&start=$3 [L,NC]
RewriteRule ^ptopic([0-9]*).* viewtopic.php?t=$1&view=previous [L,NC]
RewriteRule ^ntopic([0-9]*).* viewtopic.php?t=$1&view=next [L,NC]
asiaexpat
PR1
PR1
 
Posts: 121
Joined: Fri Aug 04, 2006 4:29 am

Postby dcz » Fri Aug 04, 2006 12:15 pm

All right so you want to migrate from the able2know mod rewrite to the phpBB SEO mixed one ?

So you'll first need to uninstall the able2know mod and then install the phpBB SEO one.

I recommend you perform local test just to make sure everything will be correctly installed before going online.

Then, this topic is a good thing to read.

Your robots should look like :

Code: Select all
User-agent: *
Disallow: /phpBB2/viewtopic.php
Disallow: /phpBB2/viewforum.php
Disallow: /phpBB2/index.php?
Disallow: /phpBB2/posting.php
Disallow: /phpBB2/groupcp.php
Disallow: /phpBB2/profile.php
Disallow: /memberlist.php
Disallow: /phpBB2/search.php
Disallow: /phpBB2/login.php
Disallow: /phpBB2/faq.php
Disallow: /phpBB2/about
Disallow: /phpBB2/member
Disallow: /phpBB2/post
Disallow: /phpBB2/mark
Disallow: /phpBB2/updates-topic.html
Disallow: /phpBB2/stop-updates-topic.html
Disallow: /phpBB2/ptopic
Disallow: /phpBB2/ntopic


Then, these rewriterules will help out a lot ;)
Code: Select all
RewriteRule ^about([0-9]+)-(.*)-([0-9]+)\.html /topic$1-$3.html [R=301,L]
RewriteRule ^about([0-9]+)-([0-9]+)\.html /topic$1-$2.html [R=301,L]
RewriteRule ^about([0-9]+)\.html /topic$1.html [R=301,L]
RewriteRule ^ptopic([0-9]+)\.html /index.php [R=301,L]
RewriteRule ^ntopic([0-9]+)\.html /index.php [R=301,L]


Just put them in your new .htaccess, before the forum rewriterules.

And for your portal.php file.

Add :

Code: Select all
DirectoryIndex portal.php index.php index.html index.htm


before :
Code: Select all
RewriteEngine On


It's better than :

Code: Select all
RedirectMatch temp ^/$ http://www.asia-expatsforum.com/phpBB2/portal.php



As well, you'll need to take a look at the www prefix issue ;)

++
Useful links :
SEO Forum || SEO Directory || SEO phpBB || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Recherche
dcz
Admin
Admin
 
Posts: 21424
Joined: Fri Apr 28, 2006 9:03 pm

Postby asiaexpat » Fri Aug 04, 2006 1:51 pm

thanks
my problem is time--i dont know when I can do this

In the meantime --should i put back that htaccess file from my previos post?
asiaexpat
PR1
PR1
 
Posts: 121
Joined: Fri Aug 04, 2006 4:29 am

Postby dcz » Fri Aug 04, 2006 8:17 pm

asiaexpat wrote:In the meantime --should i put back that htaccess file from my previos post?


I am not sure to understand here. .htaccess are only used to allow our new URLs to work.

The able2know rewrite mod needs it's .htaccess for it's URLs to work. Same for the phpBB SEO ones.

So what would you put back if you did not install the phpBB SEO mod rewrite ?

++
Useful links :
SEO Forum || SEO Directory || SEO phpBB || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Recherche
dcz
Admin
Admin
 
Posts: 21424
Joined: Fri Apr 28, 2006 9:03 pm

Postby asiaexpat » Sat Aug 05, 2006 4:07 am

never mind-- i will start on uninstalling able today :D
asiaexpat
PR1
PR1
 
Posts: 121
Joined: Fri Aug 04, 2006 4:29 am

Postby asiaexpat » Sat Aug 05, 2006 6:01 am

Ok

I did the advanced mod--loks to be working ok


need to look at the www issue and the old links google issue which i dont really understand--whether to remove old links
asiaexpat
PR1
PR1
 
Posts: 121
Joined: Fri Aug 04, 2006 4:29 am

Postby asiaexpat » Sat Aug 05, 2006 9:18 am

where should my htacess file be located?

i have directory off of my root in ftp called asia-expatsforum.com and inside there i have my phpbb2 directory
should teh htacces be inside the asia-expatsforum.com folder? or outside of it?
asiaexpat
PR1
PR1
 
Posts: 121
Joined: Fri Aug 04, 2006 4:29 am

Postby asiaexpat » Sat Aug 05, 2006 9:24 am

i put
DirectoryIndex portal.php index.php index.html index.htm

in htacess file

does not work

it is redirected by index.html file which i have coded to redirect
asiaexpat
PR1
PR1
 
Posts: 121
Joined: Fri Aug 04, 2006 4:29 am

Postby dcz » Sat Aug 05, 2006 9:48 am

So,

All your rewriterules should be located in the same .htacceess in the root folder, eg one folder above phpbb in your case.

You should just make sure the path in it are correct and it will work.

Then, you should not redirect using html.

the directoryindex command should work, put it at the beginning of the root .htaccess files.

Then as you made up your mind for the advanced mod rewrite instead,
you won't need the redirection I proposed.

Just the robots.txt.

Besides it's working nicely :D

++
Useful links :
SEO Forum || SEO Directory || SEO phpBB || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Recherche
dcz
Admin
Admin
 
Posts: 21424
Joined: Fri Apr 28, 2006 9:03 pm

Postby asiaexpat » Sat Aug 05, 2006 9:53 am

this does not work

DirectoryIndex portal.php index.php index.html index.htm

i just put it back and i get a directory index of files on the server-not a redirect
asiaexpat
PR1
PR1
 
Posts: 121
Joined: Fri Aug 04, 2006 4:29 am

Postby dcz » Sat Aug 05, 2006 10:03 am

asiaexpat wrote:i just put it back and i get a directory index of files on the server-not a redirect


I though you wanted people hitting example.com to fell on example.com/portal.php, which is the proper way to deal with such type of config.
Please post you .htaccess if you want further help out ;)

++
Useful links :
SEO Forum || SEO Directory || SEO phpBB || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Recherche
dcz
Admin
Admin
 
Posts: 21424
Joined: Fri Apr 28, 2006 9:03 pm

Postby asiaexpat » Sat Aug 05, 2006 10:08 am

this is what i have now
Code: Select all
Options +FollowSymlinks
RedirectMatch temp ^/$ http://www.asia-expatsforum.com/phpBB2/portal.php
RewriteEngine On
RewriteCond %{HTTP_HOST} ^asia-expatsforum\.com$ [NC]
RewriteRule ^(.*) http://www.asia-expatsforum.com/$1 [QSA,L,R=301]
RewriteBase /
# FORUM PROTECTION RULE
RewriteRule ^phpBB2/.+/([^/]+\.html)$ /phpBB2/index.php [R=301,L]
# CATEGORIES
RewriteRule ^phpBB2/.+-vc([0-9]+)\.html$ /phpBB2/index.php?c=$1 [QSA,L]
# PAGINATED FORUM
RewriteRule ^phpBB2/.+-vf([0-9]+)-([0-9]+)\.html$ /phpbb2/viewforum.php?f=$1&start=$2 [QSA,L]
# FORUM
RewriteRule ^phpBB2/.+-vf([0-9]+)\.html$ /phpBB2/viewforum.php?f=$1 [QSA,L]
# PAGINATED TOPIC
RewriteRule ^phpBB2/.+-vt([0-9]+)-([0-9]+)\.html$ /phpbb2/viewtopic.php?t=$1&start=$2 [QSA,L]
# TOPIC
RewriteRule ^phpBB2/.+-vt([0-9]+)\.html$ /phpBB2/viewtopic.php?t=$1 [QSA,L]
# POST
RewriteRule ^phpBB2/post([0-9]+)\.html$ /phpBB2/viewtopic.php?p=$1 [QSA,L]
#PROFILES
RewriteRule ^phpBB2/member([0-9]+)\.html$ /phpBB2/profile.php?mode=viewprofile&u=$1 [QSA,L]
# END PHPBB PAGES



when i remove the
Code: Select all
RedirectMatch temp ^/$ http://www.asia-expatsforum.com/phpBB2/portal.php



and put in
Code: Select all
DirectoryIndex portal.php index.php index.html index.htm


the site does not open--it returns ives me a file directory on the server
asiaexpat
PR1
PR1
 
Posts: 121
Joined: Fri Aug 04, 2006 4:29 am

Next

Return to phpBB2 mod Rewrite

 


  • Related topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 7 guests