www.webdeveloper.com
Results 1 to 2 of 2

Thread: php get variable without php-file name

  1. #1
    Join Date
    Sep 2008
    Posts
    61

    Question php get variable without php-file name

    Hey!

    I'm just curious about a thing. Normally I put in the get-variables like this

    Code:
    http://www.www.com/view.php?p=my.username
    instead I've seen some systems out there using just this

    Code:
    http://www.www.com/my.username
    eg. Facebook has got this.

    I am just wondering.. How can I achieve that in regular php?

    Cheers,
    Artheus

  2. #2
    Join Date
    Nov 2007
    Posts
    67
    Hey Art,

    they use mod rewrite with a .htaccess file and is more server related. Here's a tutorial.

    http://www.workingwith.me.uk/article...ng/mod_rewrite

    After the .htaccess is added, you'll have to change the way you pass your variables.

    Try it out and post any errors you might have if you can't get it working.
    Last edited by Blizzard84; 10-14-2009 at 04:46 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

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



Recent Articles