Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
Medprofer Posted October 15, 2015 Posted October 15, 2015 How to redirect from my old pages forums and topics address in htaccess ? http://www.medprof.ru/topic.33193.html to http://www.medprof.ru/topic/33193-болезни-сердца/ http://www.medprof.ru/forum90.html to http://www.medprof.ru/forum/90-кардиология/ What rules I need? Thanks!
VizionDev Posted October 30, 2015 Posted October 30, 2015 Add the following to your .htaccess RewriteRule ^topic.33193.html$ /topic/33193-болезни-сердца/ [R=302,L,NC]
CA3LE Posted October 30, 2015 Posted October 30, 2015 11 hours ago, RADStudios said: Add the following to your .htaccess RewriteRule ^topic.33193.html$ /topic/33193-болезни-сердца/ [R=302,L,NC] I think they're looking for more of an all around rewrite rule that's wildcard for all posts and topics. RewriteRule ^topic.([0-9]+).html$ /topic/$1- [NC,R=302,QSA,L] RewriteRule ^forum([0-9]+).html$ /forum/$1- [NC,R=302,QSA,L] But those actually won't work... the problem is that since 4.0 it seems the topic and forum URLs will only resolve with the name appended. You used to be able to enter http://www.medprof.ru/topic/33193- and it would resolve to http://www.medprof.ru/topic/33193-болезни-сердца/ automatically... doesn't do that anymore. So you'll have to do something like this. RewriteRule ^topic.([0-9]+).html$ /index.php?app=forums&module=forums&controller=topic&id=$1 [NC,R=302,L] RewriteRule ^forum([0-9]+).html$ /index.php?app=forums&module=forums&controller=forums&id=$1 [NC,R=302,L] Instead of using the friendly URLs you point them to the query string format. I tested those URLs on your forum so I'd bet those rules will work for you.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.