# Mod\_rewrite and .htaccess problem bypass solution needed

**URL:** <https://www.ruby-forum.com/t/mod-rewrite-and-htaccess-problem-bypass-solution-needed/190199>\
**Category:** NGINX\
**Created:** [June 17, 2010, 4:22pm UTC](https://www.ruby-forum.com/t/mod-rewrite-and-htaccess-problem-bypass-solution-needed/190199 "2010-06-17T16:22:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dandadude](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/b5e925/32.png) [@dandadude](https://www.ruby-forum.com/u/dandadude)\
**Post date:** [June 17, 2010, 4:22pm UTC](https://www.ruby-forum.com/t/mod-rewrite-and-htaccess-problem-bypass-solution-needed/190199/1 "2010-06-17T16:22:18Z")

</div>

Hi!

I have set Nginx to server static files before apache. But when there is  
a Drupal site or any custom made site that useres .htaccess mod\_rewrites  
to generate an image-file, logically the files are not found, because  
the URL doesn’t exist.

My question is:  
Is there a way to tell Nginx to try these files, and if no file found,  
try to get it from apache?  
If yes, would this give a substantial overhead compared to only using  
apache and no Nginx frontend?  
If no, then the only solution is to always modify my nginx site settings  
so that the builtin rewrite would be handled (by Nginx)? This solution  
of course is not too elegant, when you think of several-hundred sites  
that are coming from an only-apache based hosting…

Thanks in advance!

Regards,  
Daniel

Posted at Nginx Forum:

> **[mod\_rewrite and .htaccess problem bypass solution needed](https://forum.nginx.org/read.php?2,97883,97883#msg-97883)**
>
> Hi! I have set Nginx to server static files before apache. But when there is a Drupal site or any custom made site that useres .htaccess mod\_rewrites to generate an image-file, logically the files are not found, because the URL doesn't exist. My...
