Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

Website and Server Administration Forum


You are currently viewing our Website and Server Administration Forum as a guest. Please register to participate.
Login



Reply
NEED HELP - Redirecting Old Forum URL's in php
Old 02-06-2009, 02:51 PM NEED HELP - Redirecting Old Forum URL's in php
brandonroy's Avatar
Average Talker

Latest Blog Post:
Announcements & Updates!
Posts: 18
Name: Brandon
Location: Louisiana, US
Trades: 0
A few days ago I converted my SMF 1.1.7 forum over to vbulletin 3.8.1, but I need to quickly get my old smf url's 301 redirected to the new vb style urls.

This is the best thing I got so far, but I don't know how to use it for SMF! But I heard it can be done: http://www.vbulletin.org/forum/showt...=176964&page=4

Google is going to shoot bolts of lightning at my site if I don't quickly figure out how to redirect those old url's! Right now, all the old url's just forward to my forum homepage.

I tried using .htaccess like this
redirect 301 /index.phpSMFtopicURL http://www.example.com/newVBtopicURL

But the old topic url STILL just forwarded to my forum homepage. And it's about 200 url's im trying to redirect, which can cause a 500 internal server error with all those redirects in .htaccess.

Anyway. Fast help is appreciated. I can't find answers anywhere.
__________________

Please login or register to view this content. Registration is FREE
brandonroy is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 02-06-2009, 05:40 PM Re: NEED HELP - Redirecting Old Forum URL's in php
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,528
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Give us an EXACT example of old and new URLs and we can figure something out.
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 02-06-2009, 06:50 PM Re: NEED HELP - Redirecting Old Forum URL's in php
brandonroy's Avatar
Average Talker

Latest Blog Post:
Announcements & Updates!
Posts: 18
Name: Brandon
Location: Louisiana, US
Trades: 0
Quote:
Originally Posted by chrishirst View Post
Give us an EXACT example of old and new URLs and we can figure something out.
OLD urls
http://www.Example.com/index.php?topic=162

NEW urls
http://www.Example.com/showthread.php?t=333

Thanks
__________________

Please login or register to view this content. Registration is FREE
brandonroy is offline
Reply With Quote
View Public Profile
 
Old 02-14-2009, 05:23 PM Re: NEED HELP - Redirecting Old Forum URL's in php
brandonroy's Avatar
Average Talker

Latest Blog Post:
Announcements & Updates!
Posts: 18
Name: Brandon
Location: Louisiana, US
Trades: 0
Still need help with this..

I'm using this code to create a 301 redirect from old smf forum to new vbulletin forum. But I'm getting these two errors when i visit an old url:

Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /my/absolute/path/vbseo301.php on line 2

Parse error: syntax error, unexpected T_STRING in /my/absolute/path/vbseo301.php on line 2


I can't understand the problem?
__________________

Please login or register to view this content. Registration is FREE
brandonroy is offline
Reply With Quote
View Public Profile
 
Old 02-14-2009, 05:51 PM Re: NEED HELP - Redirecting Old Forum URL's in php
Average Talker

Posts: 29
Trades: 0
I am not sure, but you could try one of these. These go in your .htaccess file.

You could do a RedirectionMatch. Need one for each page.
Code:
 redirectMatch permanent index\.php\?topic=1 showthread\.php\?t=1
OR if they have the same number

Code:
 redirectMatch permanent index\.php\?topic=(,*) showthread\.php\?t=$1
OR

Code:
 Options +FollowSymLinks
RewriteEngine on
RewriteRule ^index\.php\?topic=(,*)$ showthread\.php\?t=$1 [R=301,L]

Last edited by noobster; 02-14-2009 at 05:54 PM..
noobster is offline
Reply With Quote
View Public Profile
 
Old 02-14-2009, 06:08 PM Re: NEED HELP - Redirecting Old Forum URL's in php
brandonroy's Avatar
Average Talker

Latest Blog Post:
Announcements & Updates!
Posts: 18
Name: Brandon
Location: Louisiana, US
Trades: 0
Quote:
Originally Posted by noobster View Post
I am not sure, but you could try one of these. These go in your .htaccess file.

You could do a RedirectionMatch. Need one for each page.
Code:
 redirectMatch permanent index\.php\?topic=1 showthread\.php\?t=1
OR if they have the same number

Code:
 redirectMatch permanent index\.php\?topic=(,*) showthread\.php\?t=$1
OR

Code:
 Options +FollowSymLinks
RewriteEngine on
RewriteRule ^index\.php\?topic=(,*)$ showthread\.php\?t=$1 [R=301,L]
The thread numbers aren't the same. None of the above code worked
__________________

Please login or register to view this content. Registration is FREE
brandonroy is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to NEED HELP - Redirecting Old Forum URL's in php
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.17094 seconds with 12 queries