Skip to main content
Inspiring
March 18, 2008
Question

Question on 301 redirects

  • March 18, 2008
  • 1 reply
  • 305 views
In MX 7, I am attempting to do 301 redirects, using the attached code placed in application.cfc. The code works perfectly -- just as long as the files I'm attempting to redirect remain physically present. If they are removed or renamed, though, I get a 404 error. If the redirected files can never go away, doesn't that partially negate the utility of a 301 redirect? Is there any way around this?
    This topic has been closed for replies.

    1 reply

    Inspiring
    March 18, 2008
    I see what you're trying to do, but the 404 condition trips (I would think
    by the web server, even before the CF server is involved?) before the
    Application.cfc has a chance to do the 301.

    You should probbably define a 404 template that then palms processing off
    to your 301 template, as needs must.

    --
    Adam