# VBulletin rewrite rules

**URL:** <https://www.ruby-forum.com/t/vbulletin-rewrite-rules/148132>\
**Category:** NGINX\
**Created:** [September 9, 2008, 5:54pm UTC](https://www.ruby-forum.com/t/vbulletin-rewrite-rules/148132 "2008-09-09T17:54:10Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Anoop\_A](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/a183cd/32.png) [@Anoop\_A](https://www.ruby-forum.com/u/Anoop_A)\
**Post date:** [September 9, 2008, 5:54pm UTC](https://www.ruby-forum.com/t/vbulletin-rewrite-rules/148132/1 "2008-09-09T17:54:10Z")

</div>

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
