We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 30136
    • 3 Posts
    Hello,

    I have a really strange error on my site, regarding rewriting url’s.

    Basicly, when i go here i do get the testpage, but when i go here i get a completely different page.

    On the second page is a little snippet that dumps all the $_GET variable’s, and it shows $_GET[’q’] is 6, as intended. How is it possible that the page is different then?
      • 30136
      • 3 Posts
      Right, nevermind.
      I solved it already tongue

      The rewrite rule wrote q=ID, while the url was id=ID.
      So i changed this line
      RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
      

      into
      RewriteRule ^(.*)$ index.php?id=$1 [L,QSA]
      


      Silly me. rolleyes
      • Quote from: TjHeuvel at Jan 13, 2009, 10:46 AM

        Right, nevermind.
        I solved it already tongue

        The rewrite rule wrote q=ID, while the url was id=ID.
        So i changed this line
        RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
        

        into
        RewriteRule ^(.*)$ index.php?id=$1 [L,QSA]
        


        Silly me. rolleyes
        I think you are still confused. The rewriterule is supposed to write q=requested/alias. This is how friendly URLs work.