1. 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

Discussion in 'Troubleshooting and Problems' started by thomas1, Jun 15, 2016.

Tags:
  1. thomas1

    thomas1 Member

    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!
     
  2. thomas1

    thomas1 Member

    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/
     
  3. Mike

    Mike XenForo Developer Staff Member

    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 likes this.
  4. thomas1

    thomas1 Member

    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!
     

Share This Page