rewrite rule problem

Discussion in 'Site & Server Administration' started by promotingspace.net, Aug 30, 2009.

  1. #1
    Hi
    I use this rule:
    RewriteRule ^restaurants/([^/\.]+)/([^/\.]+)/([0-9]+)(.*)/ $ project/food/restaurentProfile.php?rid=$3
    Code (markup):
    to redirect
    domain.com/restaurants/state/city/12542-restaurant_name/
    to
    domain.com/restaurants.php?rid=12542

    But I get 500 Internal Server Error
    Where I am wrong?
    Thank you for your help
    Also tried this rule:
    RewriteRule ^restaurants/([^/\.]+)(.*)/([^/\.]+)(.*)/([0-9]+)(.*)/ $ restaurentProfile.php?rid=$5
    Code (markup):

     
    promotingspace.net, Aug 30, 2009 IP
  2. promotingspace.net

    promotingspace.net Peon

    Messages:
    361
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    This code is working now:
    RewriteRule ^restaurants/([^/.]+)/([^/.]+)/([0-9]+)(.*)$ project/food/restaurentProfile.php?rid=$3
    Code (text):
    Any security improvement suggestions?
    This was my first rewrite rule
     
    promotingspace.net, Aug 30, 2009 IP