htaccess redirect help

Discussion in 'Apache' started by Camay123, Nov 2, 2009.

  1. #1
    I Have a site were I changed the script.

    Now, the script is url friendly.

    The previous had url in this format:

    domain.com/index.php?module=lslslsl&lslslsl

    Currently, any indexed url with the previous format, just gives you a page stating there was an error in the script.

    I would like that anyone who access an url containing ?module in it, should be redirected to home page.

    Anyone as an idea ?
     
    Camay123, Nov 2, 2009 IP
  2. chadsmith

    chadsmith Peon

    Messages:
    82
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #2
    RewriteCond %{QUERY_STRING} ^module
    RewriteRule ^index\.php$ /? [R=301,L]
    Code (markup):
     
    chadsmith, Nov 2, 2009 IP
    Camay123 likes this.
  3. Camay123

    Camay123 Well-Known Member

    Messages:
    3,423
    Likes Received:
    86
    Best Answers:
    0
    Trophy Points:
    160
    #3
    Thanks alot. Job Done. + rep for you.
     
    Camay123, Nov 2, 2009 IP
  4. Camay123

    Camay123 Well-Known Member

    Messages:
    3,423
    Likes Received:
    86
    Best Answers:
    0
    Trophy Points:
    160
    #4
    Last edited: Nov 6, 2009
    Camay123, Nov 6, 2009 IP
  5. Camay123

    Camay123 Well-Known Member

    Messages:
    3,423
    Likes Received:
    86
    Best Answers:
    0
    Trophy Points:
    160
    #5
    any idea on this ?
     
    Camay123, Nov 7, 2009 IP