SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Enthusiast Dreeass's Avatar
    Join Date
    Sep 2012
    Posts
    52
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Nice URL for users

    I've always liked those sites that have an easy URL with slashes instead of GET methods everywhere since GET is very easy, but how do you make index.php?login plain /login? Is it by writing a php code that checks the URL and you can paste it everywhere? I'd like this 'feature'.

  2. #2
    SitePoint Member
    Join Date
    Oct 2012
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Dreeass View Post
    I've always liked those sites that have an easy URL with slashes instead of GET methods everywhere since GET is very easy, but how do you make index.php?login plain /login? Is it by writing a php code that checks the URL and you can paste it everywhere? I'd like this 'feature'.
    I'm guessing you mean something like http://www.sitepoints.com/forums/thread/889338? In this case the thread number is a seperate folder which contains an index.php file. The folder itself is created once a user creates a new thread, and obviously you're able to create an index.php file at the same time and move it to the designated folder. However, that's how I'd do it - but I remember seeing another method somewhere.

  3. #3
    SitePoint Wizard silver trophybronze trophy Cups's Avatar
    Join Date
    Oct 2006
    Location
    France, deep rural.
    Posts
    6,869
    Mentioned
    17 Post(s)
    Tagged
    1 Thread(s)
    It is a feature of the server software usually termed mod_rewrite (if using Apache, other servers have their equivalent). The mod_rewrite tutorial we usually point people to first.

  4. #4
    Certified Ethical Hacker silver trophybronze trophy dklynn's Avatar
    Join Date
    Feb 2002
    Location
    Auckland
    Posts
    14,607
    Mentioned
    19 Post(s)
    Tagged
    2 Thread(s)
    Dreeass,

    Have a read of the mod_rewrite tutorial linked in my signature (which is also resident here in the sticky threads albeit not maintained/updated).

    Regards,

    DK
    David K. Lynn - Data Koncepts is a long-time WebHostingBuzz (US/UK)
    Client and (unpaid) WHB Ambassador
    mod_rewrite Tutorial Article (setup, config, test & write
    mod_rewrite regex w/sample code) and Code Generator


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •