Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3

Thread: mod_rewrite

  1. #1
    Regular Coder slappyjaw's Avatar
    Join Date
    Mar 2009
    Location
    Wonderland!
    Posts
    146
    Thanks
    14
    Thanked 3 Times in 3 Posts

    Question mod_rewrite

    Ok so im wicked confused. Can some one please explain how to make it so that when a user types:

    www.myurl.com/THEIRUSERNAME it will show
    www.myurl.com/profile.php?id=THEIRUSERNAME

    thank you for all your help in advanced.
    Last edited by slappyjaw; 08-17-2009 at 03:16 AM.

  • #2
    Regular Coder Zangeel's Avatar
    Join Date
    Oct 2007
    Location
    public_html/
    Posts
    638
    Thanks
    17
    Thanked 79 Times in 79 Posts
    Teeheeeheee

    Code:
    RewriteEngine on
    RewriteRule ^([a-z0-9_]+)/*$ profile.php?id=$1 [QSA,NC]
    Put that in a file called .htaccess (if it's not there just create it) and put it in your root
    PHP Code:
    $aString is_string((string)array()) ? true false// true :D 
    [/CENTER]

  • Users who have thanked Zangeel for this post:

    slappyjaw (08-17-2009)

  • #3
    Regular Coder slappyjaw's Avatar
    Join Date
    Mar 2009
    Location
    Wonderland!
    Posts
    146
    Thanks
    14
    Thanked 3 Times in 3 Posts
    ok, this is very helpful. hahah i do php but the modrewrite confuses me. thanks a lot for your help.


  •  

    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
    •