URL Rewriting (mod_rewrite)

Discussion in 'Site & Server Administration' started by Erind, May 15, 2007.

  1. #1
    Hey all,

    I'm switching my sites to a user-friendly url for SEO's sake, but its a pain in the butt.

    I have a index.php and an index1.php. basically index.php has all the regular non-php links and stuff. index1.php is the actual content (music page)

    Anyway, so from index.php I have a link pointing to index1.php?fl=A&artist=ArtistName where fl is declared as first letter of artist, and artist name is artist. Now I want something like mydomain.com/A/ArtistName (easy to do right?)

    I looked on google quite a bit and saw a few url generators and whatnot, and here is what they give me (doesn't work). I use the rewrite to protect some files from other referrers, so i know it's enabled.
    
    Options +FollowSymLinks
    RewriteEngine On
    
    RewriteRule ^(.*)/(.*)/$ index1.php?fl=$1&artist=$2 [L]
    
    Code (markup):
    Can anyone look this over and see what's wrong?
     
    Erind, May 15, 2007 IP
  2. Nintendo

    Nintendo ♬ King of da Wackos ♬

    Messages:
    12,890
    Likes Received:
    1,064
    Best Answers:
    0
    Trophy Points:
    430
    #2
    Options +FollowSymLinks +Indexes
    RewriteEngine on
    RewriteBase /
    RewriteRule ^([^.]+)/([^.]+)$ index1.php?fl=$1&artist=$2 [L]
     
    Nintendo, May 15, 2007 IP