XF 1.5 redirects old domain html and posts

dutchbb

Well-known member
Can't seem to find redirects for these 2 old url's (2005)

forum.dutchbodybuilding.com/anabole-steroiden/waarom-doet-iedereen-hier-makkelijk-over-sterioden-and-anabolica-48078.html

to: forum.bodybuilding.nl/threads/48078

forum.dutchbodybuilding.com/1211472-post18.html

to: forum.bodybuilding.nl/posts/1211472
 
These haven't been tested, but you can try:
Code:
RewriteRule ^([0-9]+)-post[0-9]+.html% /posts/$1/ [R=301,L]
RewriteRule -([0-9]+).html$ /threads/$1/ [R=301,L]
 
For the "default" links, we would generally suggest using actual redirection scripts (though I believe it would be possible to redirect this via .htaccess).
 
You need an import log table for those to work.

You can try:
Code:
RewriteCond %{QUERY_STRING} t=([0-9]+)&page=([0-9]+)(&|$)
RewriteRule showthread\.php$ http:// yourdomain /threads/%1/page-%2? [R=301,L]
 
Redirecting this to the correct post is not possible it think with # before it?

forum.dutchbodybuilding.com/f10/board-regels-iedereen-lezen-1615/#post2241448

I have it redirected to the thread now but #2241448 stays in the url at the end.
 
I'm not 100% positive, though I believe the only way to redirect it is to include a different hash in the URL, as it's not something even sent to the server. Probably best to just ignore it.
 
Top Bottom