# Convert htaccess apache to nginx

**URL:** <https://www.ruby-forum.com/t/convert-htaccess-apache-to-nginx/218400>\
**Category:** NGINX\
**Created:** [March 30, 2012, 12:57pm UTC](https://www.ruby-forum.com/t/convert-htaccess-apache-to-nginx/218400 "2012-03-30T12:57:37Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dubstep](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/cdc98d/32.png) [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Post date:** [March 30, 2012, 12:57pm UTC](https://www.ruby-forum.com/t/convert-htaccess-apache-to-nginx/218400/1 "2012-03-30T12:57:37Z")

</div>

Someone can help me covert the code below to apache nginx

RewriteEngine On  
RewriteRule ^([0-9]+)$ /showthread.php?t=$1 [NC,QSA,L]

RewriteRule ^((urllist|sitemap\_).\*.(xml|txt)(.gz)?)$  
vbseo\_sitemap/vbseo\_getsitemap.php?sitemap=$1 [L]

RewriteCond %{REQUEST\_URI}  
!(admincp/|modcp/|cron|vbseo\_sitemap|api.php)  
RewriteRule ^((archive/)?(._.php(/._)?))$ vbseo.php [L,QSA]

RewriteCond %{REQUEST\_FILENAME} !-f  
RewriteCond %{REQUEST\_FILENAME} !-d  
RewriteCond %{REQUEST\_FILENAME}  
!/(admincp|modcp|clientscript|cpstyles|images)/  
RewriteRule ^(.+)$ vbseo.php [L,QSA]

I know change [L] to Last but what is NC QSA.

Thanks for help!

Posted at Nginx Forum:

> **[\[Help\] Convert htaccess apache to nginx](https://forum.nginx.org/read.php?2,224658,224658#msg-224658)**
>
> Someone can help me covert the code below to apache nginx RewriteEngine On RewriteRule ^(\[0-9\]+)$ /showthread.php?t=$1 \[NC,QSA,L\] RewriteRule ^((urllist|sitemap\_).\*\\.(xml|txt)(\\.gz)?)$ vbseo\_sitemap/vbseo\_getsitemap.php?sitemap=$1 \[L\] Rewri
