about url rewrite

Discussion in 'Apache' started by itsmani1, Mar 18, 2005.

  1. #1
    these regular expressions are doing for me.
    here is some explanation!!!!!!!

    @ root dir i have pages like:
    index.php, search.php, etc

    Folder of css
    Folder of images
    Folder of uploads

    Problem:::
    css files on index and all the pages are coming form css folder
    some of the images are coming form images folder and rest are coming
    from uploads.

    what i have to do is :::::
    i have to rewrite urls
    http://domain.com/posters/index.php?pag=news
    http://domain.com/posters/index.php?pag=news1
    http://domain.com/posters/index.php?pag=about
    to
    http://domain.com/posters/pag/news
    http://domain.com/posters/pag/news1
    http://domain.com/posters/pag/about
     
    itsmani1, Mar 18, 2005 IP
  2. rapaman

    rapaman Active Member

    Messages:
    42
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    91
    #2
    this must looks like

    RewriteRule ^posters/index\.php?pag=(.*)$ /posters/pag/$1

    This rule for mod_rewrite.

    Best Regards,
    Dmitry.
     
    rapaman, Mar 18, 2005 IP