.htaccess RewriteRule Question help please

Discussion in 'PHP' started by caspermz, Jul 21, 2009.

  1. #1
    Hello i want to put a RewriteRule on my site.

    basicly what i want to do is that the actual route to a file now is,
    /index.php?view=artist&option=com_profile&name=lopauru
    i want it to be just
    /lopauru

    i write this in the .htaccess file but something is wrong because it isnt working can you help me? this is what i have written

    Options +FollowSymlinks
    RewriteEngine on
    RewriteRule ^/([^/]+)/ /index.php?view=artist&option=com_profile&name=$1 [NC]
    PHP:
    thanks alot.
     
    caspermz, Jul 21, 2009 IP
  2. inf

    inf Peon

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Try this:

    
    RewriteRule ^([^/]+) /index.php?view=artist&option=com_profile&name=$1 [NC]
    
    Code (markup):
     
    inf, Jul 21, 2009 IP