Customizing SMF > Joomla Bridge Support

repairing unbridged URLs with htaccess

(1/2) > >>

krick:
I have some old bridged joomla/smf URLs floating around that I'd like to permanently re-direct to the correct URLs.

OLD URL:   http://www.tankadin.com/index.php?option=com_smf&Itemid=39&topic=134.msg735
NEW URL:   http://www.tankadin.com/forum/index.php?topic=134.msg735

This is what I've come up with to put in my .htaccess file based on other RewriteRules that I have that are working, however it doesn't work and I suspect that I have something subtle about the syntax messed up...


--- Code: ---RewriteRule ^index.php?option=com_smf&Itemid=39&(.*)$ http://www.tankadin.com/forum/index.php?$1 [L,R=301]

--- End code ---

Can anyone point me in the right direction?

H:
krick, do you still need help with this?

I'm not particularly good with rewrite rules. Another thing you could look at would be to add a bit of code to /index.php which just extracts the topic= and redirects to the relevant SMF url.

kai920:
H,

I still need help with this if you have any ideas. I remember a LONG time ago I had some htaccess rules that redirected from standalone forum to bridged, but am now looking to do the opposite. The only difference to krick's situation is that mine were SEF Joomla URLs.

krick:

--- Quote from: H on June 27, 2009, 11:08:32 AM ---krick, do you still need help with this?

I'm not particularly good with rewrite rules. Another thing you could look at would be to add a bit of code to /index.php which just extracts the topic= and redirects to the relevant SMF url.

--- End quote ---

Yes, I still have a bunch of old bridged URLs floating around on the web that I'd love to redirect to the current unbridged URLs.  I was never able to get the htaccess rewrite working for some reason.

H:
This isn't .htaccess, but it should do the job.

Put this in index.php:


--- Code: ---<?php
if(isset($_GET['option']) && $_GET['option'] == 'com_smf')
{
$url = '/index.php';
if(isset($_GET['topic']))
$url .= '?topic='. $_GET['topic'] .'';

header("HTTP/1.1 301 Moved Permanently");
header('Location: '. $url .'');
header("Connection: close");
}
?>
--- End code ---

/edit: This line:

$url = '/index.php';

Will need to be modified to wherever your forum is. For example, /forum/index.php

Navigation

[0] Message Index

[#] Next page

Go to full version