Apache mod_rewrite help

Discussion in 'Apache' started by kiransarv, Sep 18, 2008.

  1. #1
    Hi all, I am facing problems in redirecting...

    I have a jsp file in tomcat root webapps named X.jsp i want to redirect any request of pattern localhost:8080/X?u=(url) to localhost:8080/X.jsp?u=(url)..
    How can i do this..can any one help me in rewrite rule...is domain other than localhost will be a problem??
     
    kiransarv, Sep 18, 2008 IP
  2. drunnells

    drunnells Peon

    Messages:
    79
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Maybe something like this in .htaccess?:

    RewriteEngine on
    RewriteRule ^X?u=(.+) X.jsp?u=$1 [nc]
    Code (markup):
     
    drunnells, Sep 18, 2008 IP