how to change apache .htaccess to nginx rewrite

Discussion in 'BlackHat Lounge' started by hyp959, Mar 29, 2009.

  1. hyp959

    hyp959 Registered Member

    Joined:
    Feb 20, 2008
    Messages:
    53
    Likes Received:
    78
    Occupation:
    CEO
    apache .htaccess
    Code:
     
    RewriteEngine On
    RewriteBase /
    RewriteRule "^[^./]*_([0-9]+)\.html$"    "/index.php?bookid=$1" [T=application/x-httpd-php]
    RewriteRule "^all-files-page([0-9]+)\.html$"          "/index.php?cat=0&page=$1" [T=application/x-httpd-php]
    RewriteRule "^all-files.html$"     "/index.php?cat=0&page=0" [T=application/x-httpd-php]
    RewriteRule "^audio-page([0-9]+)\.html$"  "/index.php?cat=1&page=$1" [T=application/x-httpd-php]
    RewriteRule "^audio.html$"     "/index.php?cat=1&page=0" [T=application/x-httpd-php]
    RewriteRule "^video-page([0-9]+)\.html$"  "/index.php?cat=2&page=$1" [T=application/x-httpd-php]
    RewriteRule "^video.html$"     "/index.php?cat=2&page=0" [T=application/x-httpd-php]
    RewriteRule "^software-page([0-9]+)\.html$"   "/index.php?cat=3&page=$1" [T=application/x-httpd-php]
    RewriteRule "^software.html$"     "/index.php?cat=3&page=0" [T=application/x-httpd-php]
    RewriteRule "^games-page([0-9]+)\.html$"          "/index.php?cat=4&page=$1" [T=application/x-httpd-php]
    RewriteRule "^games.html$"     "/index.php?cat=4&page=0" [T=application/x-httpd-php]
    RewriteRule "^books-page([0-9]+)\.html$"   "/index.php?cat=5&page=$1" [T=application/x-httpd-php]
    RewriteRule "^books.html$"     "/index.php?cat=5&page=0" [T=application/x-httpd-php]
    RewriteRule "^other-page([0-9]+)\.html$"               "/index.php?cat=6&page=$1" [T=application/x-httpd-php]
    RewriteRule "^other.html$"                              "/index.php?cat=6&page=0" [T=application/x-httpd-php]
    RewriteRule "sitemap.xml" "/sitemap.php" [T=application/x-httpd-php]
     
    
    plz help
    thanks :)