mod_rewrite problem

Discussion in 'Apache' started by kjuzy, Jun 10, 2008.

  1. #1
    Ok, i have a huge problem with mod_rewrite on my server. I have this piece of code in my .htaccess
    #RewriteRule   ^gallery/([0-9]+)-([^/]*)/(.*)$ gallery.php?gal=$1&img=$3 [L]
    HTML:
    and as it is it should like http://www.mysite.com/gallery.php?gal=2 turned into http://www.mysite.com/gallery/name-of-the-gallery but i'am keeping get errors like 404, so please tell me can i fix this and how? Thank you in advance.:)
     
    kjuzy, Jun 10, 2008 IP
  2. Trusted Writer

    Trusted Writer Banned

    Messages:
    1,370
    Likes Received:
    52
    Best Answers:
    0
    Trophy Points:
    160
    #2
    Trusted Writer, Jun 12, 2008 IP
  3. objx

    objx Peon

    Messages:
    34
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Does your htaccess look exactly as you wrote it in this post?
    Because you have used the "#"-character which transforms that line into a comment, not a rewrite rule.
    This would definetely make your browser go 404 on you.
     
    objx, Jun 12, 2008 IP
  4. kjuzy

    kjuzy Peon

    Messages:
    8
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    yap, thanks objx i didn't remind of that -.- it's working fine now, thanks.
     
    kjuzy, Jun 12, 2008 IP