How to change dynamic profile.php?id=1 to /username

Discussion in 'Apache' started by AllWhatsRock, Aug 23, 2011.

  1. #1
    I am building a dynamic PHP and MySQL powered website and the profile pages have URL's like mydomain.com/profile.php?id=1 but I want them to be mydomain.com/username. How do I do this? This is my first time with mod_rewrite so try and keep it simple,

    Thanks
     
    AllWhatsRock, Aug 23, 2011 IP
  2. Fastseo

    Fastseo Active Member

    Messages:
    151
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    71
    #2
    you can use .htaccess. it can help redirect dynamic url to static Apache Web Server
     
    Fastseo, Aug 23, 2011 IP
  3. AllWhatsRock

    AllWhatsRock Active Member

    Messages:
    60
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    61
    #3
    I know I have to use a .htaccess file but what do I type into it?
     
    AllWhatsRock, Aug 23, 2011 IP