Need Help for URL Rewrite

Discussion in 'Apache' started by falconlink, May 6, 2013.

  1. #1
    Hi guys,

    I'm trying to rewrite "domain/tourism-spot.php?id=$1" url to "domain/tourism/spot/id.html" format, but I can't solve this as I'm not expert in this case.

    I have tried with this RewriteRule ^tourism/spot/(.*).html$ tourism-spot.php?id=$1 [NC], but not working. Can anybody let me know the correct program?

    Thanks in advance.
     
    falconlink, May 6, 2013 IP
  2. Markwebuk

    Markwebuk Well-Known Member

    Messages:
    1,595
    Likes Received:
    17
    Best Answers:
    2
    Trophy Points:
    113
    #2
    Have you added the code in htaccess :

    RewriteEngine On
    RewriteRule ^admin/([^/]*)/([^/]*)$ /admin/index.php?View=$1&Model=$2 [L]

    Note : Modify it as per your requirements.
    You probably want to use : generateit.net/mod-rewrite/

    Hope it helps!
     
    Markwebuk, May 8, 2013 IP