Jump to content

How to redirect


Medprofer
 Share

Recommended Posts

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!

Edited by Medprofer
Link to comment
Share on other sites

  • 2 weeks later...
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.

Edited by CA3LE
Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...