# Apache .htaccess to Nginx rewrite question

**URL:** <https://www.ruby-forum.com/t/apache-htaccess-to-nginx-rewrite-question/208231>\
**Category:** NGINX\
**Created:** [June 12, 2011, 9:58pm UTC](https://www.ruby-forum.com/t/apache-htaccess-to-nginx-rewrite-question/208231 "2011-06-12T21:58:52Z")\
**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:** [June 12, 2011, 9:58pm UTC](https://www.ruby-forum.com/t/apache-htaccess-to-nginx-rewrite-question/208231/1 "2011-06-12T21:58:52Z")

</div>

Hello, I am having a tough time converting my .htaccess rewrite rules  
into Nginx, any help will be greatly appreciated.

Here is what I need converting

RewriteEngine on  
RewriteCond %{REQUEST\_URI} !^/server-info  
RewriteCond %{REQUEST\_URI} !^/server-status  
RewriteCond %{DOCUMENT\_ROOT}%{REQUEST\_URI} !-f  
RewriteCond %{REQUEST\_URI} (._).(gif|jpg|jpeg|png)$  
RewriteRule ^(._) http://%{http\_host}/pictures/no\_picture.jpg

RewriteRule ^video/([-_!~\*'()a-zA-Z0-9]+)-([-_!~\*'()a-zA-Z0-9]+)  
http://%{http\_host}/?L=video.index&id=$2

Thanks

Posted at Nginx Forum:

> **[Apache .htaccess to Nginx rewrite question](https://forum.nginx.org/read.php?2,206238,206238#msg-206238)**
>
> Hello, I am having a tough time converting my .htaccess rewrite rules into Nginx, any help will be greatly appreciated. Here is what I need converting RewriteEngine on RewriteCond %{REQUEST\_URI} !^/server-info RewriteCond %{REQUEST\_URI}...
