redirect everything from dynamic url?

Discussion in 'Apache' started by S2X, May 28, 2006.

  1. #1
    I need to redirect from the dynamic page to the mod_rewrite links like this:

    page.php?id=webtools --> webtools.htm
    page.php?id=htmltutorial --> htmltutorial.htm



    I have around 1000 pages and I don't really want to make a custom redirect for every single page, is there an easier way to have .htaccess automatically do this?
     
    S2X, May 28, 2006 IP
  2. Mystique

    Mystique Well-Known Member

    Messages:
    2,579
    Likes Received:
    94
    Best Answers:
    2
    Trophy Points:
    195
    #2
    try this
    
    RewriteEngine On 
    RewriteRule ^(.*)/(.*).htm /page.php?id=webtools
    Code (markup):
     
    Mystique, May 28, 2006 IP