Htaccess Help ( To Rewrite URL)

Discussion in 'PHP' started by neverbreaktherules, Nov 28, 2008.

  1. #1
    Hey

    I have 1 New Social Network Site

    VR

    i want user profile links to be

    domain.com/rockstar/username

    Currently its working but automaticaly changes to norma when visit
    for example Click Here

    it changes to normal
    i want it to stay as it is

    is that possible

    Regards

    Sunny
     
    neverbreaktherules, Nov 28, 2008 IP
  2. mwasif

    mwasif Active Member

    Messages:
    816
    Likes Received:
    23
    Best Answers:
    1
    Trophy Points:
    70
    #2
    Do not use full url (e.g. http://vrockz.com/search_results.php?display=$1) in your .htaccess.
     
    mwasif, Nov 28, 2008 IP
  3. neverbreaktherules

    neverbreaktherules Banned

    Messages:
    596
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    this is wht in my htacess file is

    RewriteEngine on
    RewriteRule ^rockstar/([^\.]+)$ /search_results.php?display=profile&name=$1 [r,l]
    PHP:
     
    neverbreaktherules, Nov 28, 2008 IP
  4. mwasif

    mwasif Active Member

    Messages:
    816
    Likes Received:
    23
    Best Answers:
    1
    Trophy Points:
    70
    #4
    Why you are using r?

    Try the following
    RewriteEngine onRewriteRule ^rockstar/([^\.]+)$ search_results.php?display=profile&name=$1 [L]
    Code (markup):
     
    mwasif, Nov 28, 2008 IP
  5. neverbreaktherules

    neverbreaktherules Banned

    Messages:
    596
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    withour R
    It do not load the script
    shows any load error
     
    neverbreaktherules, Nov 28, 2008 IP