VBulletin rewrite rules

Hi,

I have the following rewrite rules in my vbulleting forums .htaccess
file
(previously it was hosted at a apache web server and was working fine )

====================

RewriteEngine on
RewriteRule ^([a-z0-9_-]-(f|all)[0-9]+(p[0-9]+|/index[0-9])?.html)$
forumdisplay.php/$1 [QSA,L]
RewriteRule ^([a-z0-9_-]-(t|p)[0-9]+(p[0-9]+|/index[0-9])?.html)$
showthread.php/$1 [QSA,L]
RewriteCond %{REQUEST_URI} !(index.php|.css) [NC]
RewriteRule ^(archive|sitemap)/(.*)$ $1/index.php/$2 [QSA,L]

I tried to convert this like

location /forum/ {

rewrite ^/([a-z0-9_-]-(f|all)[0-9]+(p[0-9]+|/index[0-9])?.html)$
forumdisplay.php/$1 last;
rewrite ^/([a-z0-9_-]-(t|p)[0-9]+(p[0-9]+|/index[0-9])?.html)$
showthread.php/$1 last;

}

=========================

But this is giving me a 404 error on form threads and posts

Please let me know the rewrite rules that is equivalent to the apache
one

Thanks in advance