Forum Discussion

Zack_101440's avatar
Zack_101440
Icon for Nimbostratus rankNimbostratus
Mar 29, 2007

HTTP 301 Redirect

I am looking for a way to do a http redirect but be able to do a HTTP 301.

 

 

This code,

 

 

redirect to "http://bleh.nothing.com"

 

 

is a HTTP 302, where a HTTP 301 is a permanent redirect and web crawlers will automatically update their links.

 

 

anyone know how to do this?

 

2 Replies

  • A search of this forum for "301" returns this post (Click here) where Deb suggests changing the response code is only possible in 9.x rules (not in 4.x).

     

     

    Aaron
  • Hi Zack,

     

    Try this:

     

     

    when HTTP_REQUEST{

     

    if {[HTTP::host] equals "xxx.com"}

     

    {HTTP::respond 301 "http://bleh.nothing.com[HTTP::uri]"}

     

    }