Redirect all urls with ? to homepage?

Discussion in 'Apache' started by artboy, Mar 1, 2008.

  1. #1
    Pretty simple concept, but it has me stumped.. How do I redirect all site.com/?pages to just site.com? It's basically any page that starts with a question mark.

    Everything I've tried doesn't seem to work.
     
    artboy, Mar 1, 2008 IP
  2. Cybernaut

    Cybernaut Peon

    Messages:
    408
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Apparently, apache 2 does not aply any rewrite rules if requested url has no path like /file or /dir. It skips rewriting if it is merely a query string. You better do it inside a php script.
     
    Cybernaut, Mar 2, 2008 IP