# Convert RewriteRule ^(.\*)$ - to NGINX rewrite

**URL:** <https://www.ruby-forum.com/t/convert-rewriterule-to-nginx-rewrite/201343>\
**Category:** NGINX\
**Created:** [January 5, 2011, 4:06pm UTC](https://www.ruby-forum.com/t/convert-rewriterule-to-nginx-rewrite/201343 "2011-01-05T16:06:48Z")\
**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:** [January 5, 2011, 4:06pm UTC](https://www.ruby-forum.com/t/convert-rewriterule-to-nginx-rewrite/201343/1 "2011-01-05T16:06:48Z")

</div>

Could convert this .htaccess to NGINX rewrite?

RewriteCond %{REQUEST\_FILENAME} -f [NC,OR]  
RewriteCond %{REQUEST\_FILENAME} -d [NC]  
RewriteRule .\* - [L]

Posted at Nginx Forum:

> **[Convert RewriteRule ^(.\*)$ - \[F,L\] to NGINX rewrite](https://forum.nginx.org/read.php?2,163716,163716#msg-163716)**
>
> Could convert this .htaccess to NGINX rewrite? RewriteCond %{REQUEST\_FILENAME} -f \[NC,OR\] RewriteCond %{REQUEST\_FILENAME} -d \[NC\] RewriteRule .\* - \[L\]
