1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

mod rewrite and .htaccess

Discussion in 'PHP & Perl' started by thermal, Dec 19, 2008.

  1. thermal

    thermal Newbie

    Joined:
    Sep 24, 2008
    Messages:
    14
    Likes Received:
    9
    Looking for rewrite help in htaccess from this
    /ipod/?product=itouch
    to this
    /ipod/itouch.html
    is this possible
    Thanks in advance for any help
     
  2. cyklotrial

    cyklotrial Regular Member

    Joined:
    Oct 13, 2008
    Messages:
    248
    Likes Received:
    82
    Location:
    Wonderland
    RewriteEngine On
    RewriteRule ^/ipod/([a-zA-Z]+).html$ /ipod/?product=$1 [L]
     
  3. asep_sidhi

    asep_sidhi Newbie

    Joined:
    Jan 15, 2009
    Messages:
    1
    Likes Received:
    0
    how about if i want to change :

    /index.php?category=book#category2=lifestyle#status=promo

    into :

    /book/lifestyle/promo.html



    Thanks :)
     
  4. zone69

    zone69 Junior Member

    Joined:
    Nov 24, 2008
    Messages:
    196
    Likes Received:
    1,290
    Try this:
    Code:
    
    RewriteEngine On
    RewriteRule ^([a-zA-Z]+)/([a-zA-Z]+)/([a-zA-Z]+).html$ /index.php?category=$1&category2=$2&status=$3 [NC,L]
    
    
    Hope that helps!
     
  5. nyxxo

    nyxxo Registered Member

    Joined:
    Jan 16, 2009
    Messages:
    61
    Likes Received:
    9
    the beauty of php thanks for the help i had a similar question to this