Redirect all requests from /subfolder/ to / keeping parameters

Discussion in 'Apache' started by CrEaTi0n, Aug 19, 2009.

  1. #1
    Hi,

    We are deploying an apache/tomcat environment and due to some constraints with some of the struts we are sitting with a situation where some requests are being pushed to a subdirectory which was only valid on the development server. Is there a way that we can do a redirect using .htaccess to make the request valid?

    I.e. I make a request to mydomain.com/subfolder/post.jsp?t=1&jsid=1234 the requested gets redirected to mydomain.com/post.jsp?t=1&jsid=1234. Take note that its not just post.jsp in that directory, but any number of files which take any number of parameters.

    Thanks in advance
    Ian
     
    CrEaTi0n, Aug 19, 2009 IP
  2. szalinski

    szalinski Peon

    Messages:
    341
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #2
    i don't understand why you don't just get rid of the subfolder and move everything to the root? surely that way, there'd be no need for a rewrite..
     
    szalinski, Aug 20, 2009 IP