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

XF 1.4 ModRewrite within the XF folder

Discussion in 'XenForo Questions and Support' started by ForestForTrees, Jan 7, 2015.

  1. ForestForTrees

    ForestForTrees Well-Known Member


    I just removed an addon and want to 301 everything in www.mydomain.com/forum/media to a specific URL.

    I tried putting an .htaccess in the media folder, but no dice.

    Is there something with Route Filters that might be interfering with my .htaccess?
    Last edited: Jan 7, 2015
  2. ForestForTrees

    ForestForTrees Well-Known Member

    My host provides full management and they are working on it and have tried a number of solutions. None seem to be working. Further, we have no difficulty with redirects that aren't in the XenForo folder. This makes me wonder if XF's own rewriting may be interfering.

    Any thoughts?
  3. Brogan

    Brogan XenForo Moderator Staff Member

    Is there any reason you can't put the rewrite in the main .htaccess file?
  4. ForestForTrees

    ForestForTrees Well-Known Member

    Sure. I can put it in the web root, in the XF folder, or in the media subfolder:
  5. ForestForTrees

    ForestForTrees Well-Known Member

    With help from tech support at Liquid Web, I tried adding code to the .htaccess at all three of the levels I mentioned, but none of them worked. Neither of us could figure out what was going on.

    I thought it might be XF that is interfering with the .htaccess.

    Or maybe we're just being stupid. It wouldn't be the first time.

    Here's my question: does XF do anything that might lead you to think that it could be interfering with the .htaccess somehow and overriding it. It sounds niave to even mention it, but you folks are quite the coding experts, and Route Filters seem to involve some deep rewriting.
  6. Mike

    Mike XenForo Developer Staff Member

    You'd need to put it in the XF directory .htaccess (I'm not sure why a particular media directory would exist). Just put it before XF's existing redirects.

Share This Page