• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.5 404 redirects

thomas1

Active member
#1
We receive an awful lot of 404 hits to /forum/node.nodeid and would like to redirect them. I am sure it's a trivial matter, but what would be the rewrite rules on Apache?

/forum/NODE.NODE-ID/forum/threads/THREAD-TITLE.THREAD-ID/

to

/forum/threads/THREAD-TITLE.THREAD-ID/

Thank you for your help!
 

thomas1

Active member
#2
I'd appreciate any pointers, we have over 35,000 404 hits a day and need to redirect them. Could anyone help us with the following rewrites:

/forum/china-news-practical.144/forum/threads/chinas-air-pollution-again-at-danger-levels.51193/

to

/forum/threads/chinas-air-pollution-again-at-danger-levels.51193/
 

Mike

XenForo developer
Staff member
#3
Do you know where the links are coming from to generate the 404s? Can you reproduce it? Usually, this is down to bots who don't account for a <base> tag, so this isn't affecting real users.
 

thomas1

Active member
#4
Thanks Mike, and you were right. Those were/are mostly Chinese bots which, I guess, wouldn't respect robots.txt either. Have to ban a few IP ranges tonight.

Thanks again!