XF 1.2 SMF redirect to xF

Skylined

Well-known member
Could somebody please help me to redirect from SMF to xF?

Sample

Code:
SMF - http://www.mtb.com.uy/foro/index.php?topic=5234.0
xF - http://www.mtb.com.uy/foro/temas/asiento-antiprostatico-%C2%BFes-necesario.5234/

Temas is spanish for threads. :)
 
How could I go from
Code:
index.php?action=dlattach;topic=2745.0;attach=14374;image
to
Code:
attachments/opening-inauguracion-png.14374/

Managed to get it to work with some help, for anyone that wants to have the attachments URLs working too.
Code:
    RewriteCond %{QUERY_STRING} attach=([0-9]+) [NC]
    RewriteRule ^index.php$ attachments/%1/ [R=302,NC,L]
 
Last edited:
I have some old url's that need redirects, please advise.

Old
Code:
http://www.example.com/foros/index.php?action=profile;u=1
New
Code:
http://www.example.com/members/admin.1/


Old with PHPSESSID added on the url.
Code:
http://www.example.com/foros/index.php?PHPSESSID=jcj5jgiihhg1tvcel74i27kkb7;board=7.0
New
Code:
http://www.example.com/foro/foro-general-off-topic.7/
 
Last edited:
I tried this for profile page redirect:
Code:
# Redirect Profile
RewriteCond %{QUERY_STRING} (^|\?)u=([0-9]+)\.
RewriteRule ^index\.php$ /members/%2/? [R=301,L]
But didn't work.
 
Last edited:
@RoldanLT

Add these rules to the top of the .htaccess file in the /foros directory:

Code:
RewriteEngine On

RewriteCond %{QUERY_STRING} action=profile;u=([0-9]+)$
RewriteRule ^index\.php$ /members/%1/? [R=301,L]

RewriteCond %{QUERY_STRING} board=([0-9]+)\.
RewriteRule ^index\.php$ /foro/%1/? [R=301,L]
 
  • Like
Reactions: rdn
Top Bottom