How to Use SEO URLS for Simple GET Form

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ojsimon
    New Member
    • May 2007
    • 59

    How to Use SEO URLS for Simple GET Form

    Hi
    I am trying to make a simple get form that asks the user to enter their name and then it returns their name on the next page, i have managed to do this but now i would like to have nice clean SEO Urls insted of the ugly get urls. How do i make do this?

    I am currently doing:
    Index.php
    Code:
    <html>
    <form action="welcome.php" method="get">
    Name: <input type="text" name="name" />
    
    <input type="submit" />
    </form>
    </html>
    and

    welcome.php
    Code:
    <html>
    Welcome <?php echo $_GET["name"]; ?>.<br />
    
    
    </html>
    So my question is how to make this have clean urls such as domain.com/'search-phrase'?

    Thanks
  • bnashenas1984
    Contributor
    • Sep 2007
    • 257

    #2
    Hi
    Why don't you use POST instead of GET to hide your variables?
    Then there will be nothing shown in the URL

    Comment

    • pbmods
      Recognized Expert Expert
      • Apr 2007
      • 5821

      #3
      Heya, ojsimon.

      Look into using mod_rewrite to do this.

      Comment

      • Markus
        Recognized Expert Expert
        • Jun 2007
        • 6092

        #4
        Hey there.

        Check out this tutorial on 'pretty urls'.

        Markus.

        Comment

        • ojsimon
          New Member
          • May 2007
          • 59

          #5
          yeh i know about mod rewrite but i am struggling to implement it into my situation. Can anyone help me?

          Thanks

          Comment

          • pbmods
            Recognized Expert Expert
            • Apr 2007
            • 5821

            #6
            I'll go ahead and move this to the Apache forum to see if we can get some more Experts in on this.

            Comment

            • ojsimon
              New Member
              • May 2007
              • 59

              #7
              thanks for that mod, sorry i didnt realise there was one.
              Anyone able to help?

              Thanks

              Comment

              Working...