solved Redirect old urls to the new JR5

alt=
@andrusito
10 years ago
302 posts
Hello.

Many users gets a "Not Found" page when they access my JR5 site trough an old link from my previous JR4 site on the same domain..

Look, this is a url which worked on JR4, but not on the new version:

http://www.devocionmusical.com/index.php?t=browse_song

At that moment I was using ProJam Light skin.

What can I do to redirect my users to the new JR5 index page? I mean, is there a short way to include any old url?

Thanks!
updated by @andrusito: 05/20/14 09:30:41PM
brian
@brian
10 years ago
10,148 posts
Unfortunately there is no "easy" way at this time - you'd just need to add rewrite rules to your .htaccess file - i.e.:

RewriteCond %{QUERY_STRING} t=browse_song [NC]
RewriteRule ^[^/]+$ /songs [R=301,L,NC]

Add an entry for each old URL mapped to the new.

Hope this helps!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
alt=
@andrusito
10 years ago
302 posts
Oh.. ok.

Thanks Brian.
alt=
@andrusito
10 years ago
302 posts
@brian, I tried that code but it redirects me to

http://www.devocionmusical.com/songs?t=browse_song

(well, there's a "?" between 'songs' and 't')

I'd be great if it only takes me to http://www.devocionmusical.com/songs

Thanks!
updated by @andrusito: 04/17/14 05:34:24AM
brian
@brian
10 years ago
10,148 posts
Ahh sorry - change it to this:

RewriteCond %{QUERY_STRING} t=browse_song [NC]
RewriteRule ^[^/]+$ /songs? [R=301,L,NC]

You need to have that question mark at the end of the "songs" - that tells mod rewrite not to append the query string.

Hope this helps!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
alt=
@andrusito
10 years ago
302 posts
That worked perfect,

thanks dude!
brian
@brian
10 years ago
10,148 posts
andrusito:
That worked perfect,

thanks dude!

No problem - glad to hear it.

Thanks!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net

Tags