modrewrite redirect old search variables?

Discussion in 'Apache' started by ripcurlksm, Apr 18, 2012.

  1. #1
    I'm having a bit of a problem. For a recent project I recently converted all the content on a .asp website to MODX and they had a Google search. Google has indexed their page "search.asp" and it is appearing in searches on the new site. The first link works properly, but the second link on the following page is linking to /search/search.asp and is just redirecting to the homepage by default. Here: http://www.newhair.com/search.html?zoom_query=steve+hartman. I need to get rid of this "search.asp" page!

    I'm trying to use mod rewrite to redirect the old .asp search page to the new page but its not working.
    Basically I want to redirect this old page (with the search variable "steve"):
    http://www.newhair.com/search/searc...age=1&zoom_per_page=10&zoom_cat=-1&zoom_and=0

    To this new page (with the same search variable "steve"):
    http://www.newhair.com/search.html?zoom_query=steve

    Any ideas?


    Here is my full .htaccess file:

    As an alternative, is it possible to have search.asp go to throw a 404 error so google ignores it and removes it from their cache altogether?
     
    ripcurlksm, Apr 18, 2012 IP