PHPBB-Seo to Ip.Board 3 - Keep same URL's in Mod_Rewrite

20 posts in this topic

Posted

Hello guys,

Is possible convert a PHPBB-SEO Forum to IP.Board and keep same SEO friendly URL's?


In phpbb-seo the URL of my forum have this config:

Topic Rules = My PHPBB-SEO Forum
http://[domain] / [title]-[t + topic ID].

Example: [code]http://www.mochileiros.com/combustivel-para-fogareiros-t30770.html[/CODE]

[/font][/color]


In IP.Board Community the URL Rules are: Topic Rules = IP.Board Community [color=#282828][font=helvetica, arial, sans-serif]http://[domain] / [topic] / [ topic ID]-[Topic title] /[/font][/color] Example:

[CODE][/code]

Is possible create a Mod_Rewrite Rules to make IP.Board keep my URL's? Thanks in advance, [color=#282828][font=helvetica, arial, sans-serif]Silnei [/font][/color]







forumvie likes this

Share this post


Link to post
Share on other sites

Posted

Keeping the same URL's isn't possible, but 301-redirecting them is! This will prevent any links to the phpBB-SEO links from breaking and allow search engines to readjust to the new URL's without dropping your rankings.

I had to do a bit of .htaccess tweaking to keep my phpBB-SEO URL's when I converted TheWiiU.com to IP.Board last year. phpBB-SEO maps URL's to the stock phpBB URL's, which the converter tools will redirect properly. The trick is to redirect all the URL's back to the original phpBB URL's, and the redirection tool in the converters will redirect those to the IP.Board URL's. You have to carefully combine and order the .htaccess rules that come with each piece of software for it to work.

Here's my .htaccess file - feel free to use it yourself. Just be sure to replace every instance of "thewiiu.com" with your board's URL and modify the "RewriteBase" rule appropriately if your forum is in a subdirectory.


Options -MultiViews

RewriteEngine On

RewriteBase /


# You may need to un-comment the following lines

# Options +FollowSymlinks

# To make sure that rewritten dir or file (/|.html) will not load dir.php in case it exist

# Options -MultiViews

# REMEBER YOU ONLY NEED TO STARD MOD REWRITE ONCE

#  RewriteEngine On

# Uncomment the statement below if you want to make use of

# HTTP authentication and it does not already work.

# This could be required if you are for example using PHP via Apache CGI.

# RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]

# REWRITE BASE

#  RewriteBase /

# HERE IS A GOOD PLACE TO FORCE CANONICAL DOMAIN

# RewriteCond %{HTTP_HOST} !^thewiiu\.com$ [NC]

# RewriteRule ^(.*)$ http://thewiiu.com/$1 [QSA,L,R=301]


# DO NOT GO FURTHER IF THE REQUESTED FILE / DIR DOES EXISTS

RewriteCond %{REQUEST_FILENAME} -f

RewriteCond %{REQUEST_FILENAME} -d

RewriteRule . - [L]


#####################################################

# PHPBB SEO REWRITE RULES ALL MODES

#####################################################

# AUTHOR : dcz www.phpbb-seo.com

# STARTED : 01/2006

#################################

# FORUMS PAGES

###############

# FORUM INDEX REWRITERULE WOULD STAND HERE IF USED. "forum" REQUIRES TO BE SET AS FORUM INDEX

# RewriteRule ^forum\.html$ /index.php [QSA,L,NC]

# FORUM ALL MODES

RewriteRule ^(forum|[a-z0-9_-]*-f)([0-9]+)/?(page([0-9]+)\.html)?$ /redirect.php?f=$2&start=$4 [QSA,L,NC]

# TOPIC WITH VIRTUAL FOLDER ALL MODES

RewriteRule ^(forum|[a-z0-9_-]*-f)([0-9]+)/(topic|[a-z0-9_-]*-t)([0-9]+)(-([0-9]+))?\.html$ /redirect.php?f=$2&t=$4&start=$6 [QSA,L,NC]

# TOPIC WITHOUT FORUM ID & DELIM ALL MODES

RewriteRule ^([a-z0-9_-]*)/?(topic|[a-z0-9_-]*-t)([0-9]+)(-([0-9]+))?\.html$ /redirect.php?forum_uri=$1&t=$3&start=$5 [QSA,L,NC]

# PHPBB FILES ALL MODES

RewriteRule ^resources/[a-z0-9_-]+/(thumb/)?([0-9]+)$ /download/redirect.php?id=$2&t=$1 [QSA,L,NC]

# PROFILES ALL MODES WITH ID

#RewriteRule ^(member|[a-z0-9_-]*-u)([0-9]+)/?$ /redirect.php?mode=viewprofile&u=$2 [QSA,L,NC]

# USER MESSAGES ALL MODES WITH ID

RewriteRule ^(member|[a-z0-9_-]*-u)([0-9]+)/(topics|posts)/?(page([0-9]+)\.html)?$ /redirect.php?author_id=$2&sr=$3&start=$5 [QSA,L,NC]

# GROUPS ALL MODES

RewriteRule ^(group|[a-z0-9_-]*-g)([0-9]+)(-([0-9]+))?\.html$ /redirect.php?mode=group&g=$2&start=$4 [QSA,L,NC]

# POST

RewriteRule ^post([0-9]+)\.html$ /redirect.php?p=$1 [QSA,L,NC]

# ACTIVE TOPICS

RewriteRule ^active-topics(-([0-9]+))?\.html$ /redirect.php?search_id=active_topics&start=$2&sr=topics [QSA,L,NC]

# UNANSWERED TOPICS

RewriteRule ^unanswered(-([0-9]+))?\.html$ /redirect.php?search_id=unanswered&start=$2&sr=topics [QSA,L,NC]

# NEW POSTS

RewriteRule ^newposts(-([0-9]+))?\.html$ /redirect.php?search_id=newposts&start=$2&sr=topics [QSA,L,NC]

# UNREAD POSTS

RewriteRule ^unreadposts(-([0-9]+))?\.html$ /redirect.php?search_id=unreadposts&start=$2 [QSA,L,NC]

# THE TEAM

# RewriteRule ^the-team\.html$ /redirect.php?mode=leaders [QSA,L,NC]


# FORUM WITHOUT ID & DELIM ALL MODES

# THESE THREE LINES MUST BE LOCATED AT THE END OF YOUR HTACCESS TO WORK PROPERLY

#RewriteCond %{REQUEST_FILENAME} !-f

#RewriteCond %{REQUEST_FILENAME} !-d

#RewriteRule ^([a-z0-9_-]+)/?(page([0-9]+)\.html)?$ /redirect.php?forum_uri=$1&start=$3 [QSA,L,NC]

# FIX RELATIVE PATHS : FILES

RewriteRule ^.+/(style\.php|ucp\.php|mcp\.php|faq\.php|download/file.php)$ /$1 [QSA,L,NC,R=301]

# FIX RELATIVE PATHS : IMAGES

RewriteRule ^.+/(styles/.*|images/.*)/$ /$1 [QSA,L,NC,R=301]

# END PHPBB PAGES

#####################################################


#####################################################

RewriteCond %{HTTP_HOST} ^www.thewiiu.com$

RewriteRule ^(.*)$ "http\:\/\/thewiiu\.com$1" [R=301,L]


RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule . /index.php [L]

Bruno Dias and SidV like this

Share this post


Link to post
Share on other sites

Posted


Keeping the same URL's isn't possible, but 301-redirecting them is! This will prevent any links to the phpBB-SEO links from breaking and allow search engines to readjust to the new URL's without dropping your rankings.



I had to do a bit of .htaccess tweaking to keep my phpBB-SEO URL's when I converted [url="http://thewiiu.com/"]TheWiiU.com[/url] to IP.Board last year. phpBB-SEO maps URL's to the stock phpBB URL's, which the converter tools will redirect properly. The trick is to redirect all the URL's back to the original phpBB URL's, and the redirection tool in the converters will redirect those to the IP.Board URL's. You have to carefully combine and order the .htaccess rules that come with each piece of software for it to work.



Here's my .htaccess file - feel free to use it yourself. Just be sure to replace every instance of "thewiiu.com" with your board's URL and modify the "RewriteBase" rule appropriately if your forum is in a subdirectory.




Options -MultiViews

RewriteEngine On

RewriteBase /


# You may need to un-comment the following lines

# Options +FollowSymlinks

# To make sure that rewritten dir or file (/|.html) will not load dir.php in case it exist

# Options -MultiViews

# REMEBER YOU ONLY NEED TO STARD MOD REWRITE ONCE

#  RewriteEngine On

# Uncomment the statement below if you want to make use of

# HTTP authentication and it does not already work.

# This could be required if you are for example using PHP via Apache CGI.

# RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]

# REWRITE BASE

#  RewriteBase /

# HERE IS A GOOD PLACE TO FORCE CANONICAL DOMAIN

# RewriteCond %{HTTP_HOST} !^thewiiu.com$ [NC]

# RewriteRule ^(.*)$ http://thewiiu.com/$1 [QSA,L,R=301]


# DO NOT GO FURTHER IF THE REQUESTED FILE / DIR DOES EXISTS

RewriteCond %{REQUEST_FILENAME} -f

RewriteCond %{REQUEST_FILENAME} -d

RewriteRule . - [L]


#####################################################

# PHPBB SEO REWRITE RULES ALL MODES

#####################################################

# AUTHOR : dcz www.phpbb-seo.com

# STARTED : 01/2006

#################################

# FORUMS PAGES

###############

# FORUM INDEX REWRITERULE WOULD STAND HERE IF USED. "forum" REQUIRES TO BE SET AS FORUM INDEX

# RewriteRule ^forum.html$ /index.php [QSA,L,NC]

# FORUM ALL MODES

RewriteRule ^(forum|[a-z0-9_-]*-f)([0-9]+)/?(page([0-9]+).html)?$ /redirect.php?f=$2&start=$4 [QSA,L,NC]

# TOPIC WITH VIRTUAL FOLDER ALL MODES

RewriteRule ^(forum|[a-z0-9_-]*-f)([0-9]+)/(topic|[a-z0-9_-]*-t)([0-9]+)(-([0-9]+))?.html$ /redirect.php?f=$2&t=$4&start=$6 [QSA,L,NC]

# TOPIC WITHOUT FORUM ID & DELIM ALL MODES

RewriteRule ^([a-z0-9_-]*)/?(topic|[a-z0-9_-]*-t)([0-9]+)(-([0-9]+))?.html$ /redirect.php?forum_uri=$1&t=$3&start=$5 [QSA,L,NC]

# PHPBB FILES ALL MODES

RewriteRule ^resources/[a-z0-9_-]+/(thumb/)?([0-9]+)$ /download/redirect.php?id=$2&t=$1 [QSA,L,NC]

# PROFILES ALL MODES WITH ID

#RewriteRule ^(member|[a-z0-9_-]*-u)([0-9]+)/?$ /redirect.php?mode=viewprofile&u=$2 [QSA,L,NC]

# USER MESSAGES ALL MODES WITH ID

RewriteRule ^(member|[a-z0-9_-]*-u)([0-9]+)/(topics|posts)/?(page([0-9]+).html)?$ /redirect.php?author_id=$2&sr=$3&start=$5 [QSA,L,NC]

# GROUPS ALL MODES

RewriteRule ^(group|[a-z0-9_-]*-g)([0-9]+)(-([0-9]+))?.html$ /redirect.php?mode=group&g=$2&start=$4 [QSA,L,NC]

# POST

RewriteRule ^post([0-9]+).html$ /redirect.php?p=$1 [QSA,L,NC]

# ACTIVE TOPICS

RewriteRule ^active-topics(-([0-9]+))?.html$ /redirect.php?search_id=active_topics&start=$2&sr=topics [QSA,L,NC]

# UNANSWERED TOPICS

RewriteRule ^unanswered(-([0-9]+))?.html$ /redirect.php?search_id=unanswered&start=$2&sr=topics [QSA,L,NC]

# NEW POSTS

RewriteRule ^newposts(-([0-9]+))?.html$ /redirect.php?search_id=newposts&start=$2&sr=topics [QSA,L,NC]

# UNREAD POSTS

RewriteRule ^unreadposts(-([0-9]+))?.html$ /redirect.php?search_id=unreadposts&start=$2 [QSA,L,NC]

# THE TEAM

# RewriteRule ^the-team.html$ /redirect.php?mode=leaders [QSA,L,NC]


# FORUM WITHOUT ID & DELIM ALL MODES

# THESE THREE LINES MUST BE LOCATED AT THE END OF YOUR HTACCESS TO WORK PROPERLY

#RewriteCond %{REQUEST_FILENAME} !-f

#RewriteCond %{REQUEST_FILENAME} !-d

#RewriteRule ^([a-z0-9_-]+)/?(page([0-9]+).html)?$ /redirect.php?forum_uri=$1&start=$3 [QSA,L,NC]

# FIX RELATIVE PATHS : FILES

RewriteRule ^.+/(style.php|ucp.php|mcp.php|faq.php|download/file.php)$ /$1 [QSA,L,NC,R=301]

# FIX RELATIVE PATHS : IMAGES

RewriteRule ^.+/(styles/.*|images/.*)/$ /$1 [QSA,L,NC,R=301]

# END PHPBB PAGES

#####################################################


#####################################################

RewriteCond %{HTTP_HOST} ^www.thewiiu.com$

RewriteRule ^(.*)$ "http://thewiiu.com$1" [R=301,L]


RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule . /index.php [L]




I used SMF forums so what would I use?

Share this post


Link to post
Share on other sites

Posted


I used SMF forums so what would I use?




Unfortunately, I have no experience with SMF so someone else will have to answer that for you. This topic was specifically referring to the phpBB-SEO add-on for phpBB, and the code I posted is simply what I use on one of my own sites, since I've used the same add-on myself. I suggest you create your own topic to ask for help with rewriting SMF URL's. ;)

Share this post


Link to post
Share on other sites

Posted

I try this


RewriteEngine On

RewriteCond %{QUERY_STRING} (t|f)=([0-9]+)

RewriteRule ^view(topic|forum).php$ /index.php?show$1=%2 [R=301,L]


this code get phpbb url and convert to ipb, but the IDs of topcis and foruns has been changed, so the code redirect to another topic/forum

phpbb http://myphpbbforum.com/viewforum.php?f=12 redirect to http://myipbforum/index.php?showforum=12 but the ids are diferents foruns.

Share this post


Link to post
Share on other sites

Posted

Feld0,

I converted 90K+ posts from my phpbb 3 forums, I did not have the pbphh-SEO mod you mentioned. But I do have 1000's of links inside my community that points to other threads inside the community. They all look soemthing like:

name of link

Would your rewrite rule work for me?

Share this post


Link to post
Share on other sites

Posted


Feld0,



I converted 90K+ posts from my phpbb 3 forums, I did not have the pbphh-SEO mod you mentioned. But I do have 1000's of links inside my community that points to other threads inside the community. They all look soemthing like:

name of link

Would your rewrite rule work for me?

i have same situation.
waiting

Share this post


Link to post
Share on other sites

Posted


Feld0,



I converted 90K+ posts from my phpbb 3 forums, I did not have the pbphh-SEO mod you mentioned. But I do have 1000's of links inside my community that points to other threads inside the community. They all look soemthing like:

name of link

Would your rewrite rule work for me?



i have same situation.


waiting




If you didn't use phpBB-SEO, then the redirection tools included with the converter will have everything you need. It's been a while since I converted, but there should be documentation included with the converter tools download on how to set up redirects from your old topic links.
Bruno Dias likes this

Share this post


Link to post
Share on other sites

Posted

i have several indexed links in google, then i will lose these links :sad:

Share this post


Link to post
Share on other sites

Posted


If you didn't use phpBB-SEO, then the redirection tools included with the converter will have everything you need. It's been a while since I converted, but there should be documentation included with the converter tools download on how to set up redirects from your old topic links.


We do not use phpBB-SEO. I did not see anything pertaining on how to rewrite or redirect links inside posts that link to other threads.

Share this post


Link to post
Share on other sites

Posted

I am using phpBB-SEO and I am converting to IP Board. For URL puposes, I understood that I should use the .htaccess file to return URLs to the original phpbb format. But I would like to install IP Board on a different directory. How should I proceed not to mess around URLs 301 redirection?

Share this post


Link to post
Share on other sites

Posted

Hello, I am having a real bad time trying to redirect my old phpbb-seo URLs to new IPB URLs.

The phpbb-seo is in "directory-one", the new IPB is in "directory-two".

I followed the steps given here and edited my phpbb-seo .htaccess file to correspond to the directives given by Feld0.

I tried to put base directory "directory-one" and "directory-two".

None worked.

IPB returns a 404 message.

As long as the scripts phpbb-seo and IPB are on different directories, I have two .htaccess files.

One for phpbb-seo (the one that I am trying to change) and another one for IPB (I am noting messing with this one).

The directives given here tell me to combine the 2 .htaccess files, but in my case, different directories mean 2 .htaccess files, right?

The other thing that seems odd to me is the "redirect.php" file that is mentioned on the .htaccess file suggested.

Where is this "redirect.php"? The converter brought in tools "config.php", "memberlist.php", "viewforum.php" and "viewtopic.php".

There is no "redirect.php".

On IPB directory there is no "redirect.php" either.

I have a look at phpbb-seo website and found this link: http://www.phpbb-seo.com/en/phpbb-seo-premod/article3497.html?hilit=uninstall

I found there a "redirect.php", made the configuration changes and uploaded to my phpbb-seo directory, but it didn't work either.

Any ideas?

Share this post


Link to post
Share on other sites

Posted

Reading carefully the Feld0 post, he says " the redirection tool in the converters"...

I guess this topic is outdated, as long as the new conververts don't come with a redirection tool or "redirect.php", but now there is a change on "memberlist.php", "viewforum.php" and "viewtopic.php".

I tried to keep original .htaccess of phpbb-seo, but IPB returns a 404 answser for phpbb-seo links.

Share this post


Link to post
Share on other sites

Posted

I am suspecting that the error is being cause by IPB converter itself. I saw that in version 1.1.6, the version that I am using, It's suppose to be correct 404 errors. I guess the error was not completely fixed.

As long as new converter replaces "memberlist.php", "viewforum.php" and "viewtopic.php", I guess there is no need for changing .htaccess of phpbb-seo forum directory.

The URL will be readed by the converter as the original, it's just what the .htaccess mod rewirte does. Am I wrong?

Share this post


Link to post
Share on other sites

Posted

The problem is definitively is on IPB redirection scripts.

I have found a simple solution here:

Just had to take care of the new database schema.

Share this post


Link to post
Share on other sites

Posted

Hi Sobrenome,

You convert your phpbb-seo forum and keep the same URL using this method?

Share this post


Link to post
Share on other sites

Posted

No, the URLs are new, IP.Board style. But the old ULRs are redirecting to the new ones with the proper message, telling google that was a change on URL, but the content is the same.

Share this post


Link to post
Share on other sites

Posted

Hi Sobrenome,

With the redirection of all pages indexed in Google they continue as before or there was loss of hearing?

Share this post


Link to post
Share on other sites

Posted

Not sure we can do that directly via mod_rewrite but ipb_conv_link_topics table give the connection between phpbb topics id and ipb topics id.

Who can write a piece of code for 301 redirection? :-)

Share this post


Link to post
Share on other sites

Posted

Here is the solution, based on Feld0 post :

  • Go into your converters/Tools.Links - phpBB folder and copy 4 files to your IPB root.
  • Edit the config.php file to patch your IPB installation and convert id (something like that : define('CONV_ID', 'convert_phpbb');)

Everything should works fine.

Share this post


Link to post
Share on other sites

  • Recently Browsing   0 members

    No registered users viewing this page.