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 2 of 2
  1. #1
    Senior Coder doubledee's Avatar
    Join Date
    Mar 2011
    Location
    Arizona
    Posts
    1,048
    Thanks
    25
    Thanked 0 Times in 0 Posts

    Pretty URL for Member Profile

    This is the default page for DoubleDee's Profile...

    http://local.debbie/account/profile.php?user=DoubleDee&tab=about-me


    I want to be able to type in a Pretty URL like this...

    http://local.debbie/account/profile/DoubleDee/about-me


    So I added this line into my root .htaccess...

    RewriteRule account/profile/([a-zA-Z0-9_.-]+)$ account/profile.php?user=$1&tab=about-me


    It was working yesterday but now isn't?!

    (Someone gave me some mod_rewrites to use which didn't work, so I commented them out, but now I wonder if they broke something?!)

    Any idea what I did to mess things up?


    Debbie

  • #2
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,987
    Thanks
    4
    Thanked 2,660 Times in 2,629 Posts
    This pattern doesn't match the url in question.
    It may be better to capture both:
    PHP Code:
    account/profile/([^/]+)/([^/]+)$ account/profile.php?user=$1&tab=$[L
    Something doesn't smell right with that and I can't put my finger on it. I can't test it here either so you'll have to give it a shot.


  •  

    Posting Permissions

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