# Rails Rewrite rule (on mod\_rails)

**URL:** <https://www.ruby-forum.com/t/rails-rewrite-rule-on-mod-rails/143904>\
**Category:** Rails\
**Created:** [July 23, 2008, 6:25pm UTC](https://www.ruby-forum.com/t/rails-rewrite-rule-on-mod-rails/143904 "2008-07-23T18:25:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![MEK](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/f08c70/32.png) [@MEK](https://www.ruby-forum.com/u/MEK)\
**Post date:** [July 23, 2008, 6:25pm UTC](https://www.ruby-forum.com/t/rails-rewrite-rule-on-mod-rails/143904/1 "2008-07-23T18:25:01Z")

</div>

Hello,

I’m running fine my application on the dev server with apache2 and  
mod\_rails, but on the production server I have a strange issue… it  
seems like something is wrong with httpd.conf of .htacces… the dev  
server is a DreamHost PS and I’m configuring the production one one  
HostGator.

I have a public/users/ folder with member profile images and a users  
controller…

{dreamhost}/users/15 =\> member profile  
{dreamhost}/users/15.jpg =\> user image

{hostgator}/user/15 =\> member profile  
{hostgator}/users/15.jpg =\> member profile (…not found)  
{hostgator}/users/15.jpg?hello =\> user image…

what is this? I have this rule in .htaccess, but it seems to be  
ignored on HG…

RewriteCond %{REQUEST\_URI} ^/users/_.jpg  
RewriteRule ._ - [L]

oh, one more thing (big)

Hello,

I’m running fine my application on the dev server with apache2 and  
mod\_rails, but on the production server I have a strange issue… it  
seems like something is wrong with httpd.conf of .htacces… the dev  
server is a DreamHost PS and I’m configuring the production one one  
HostGator.

I have a public/users/ folder with member profile images and a users  
controller…

{dreamhost}/images/icon/up.png regular icon  
{dreamhost}/images/icon/down.png regular icon

{hostgator}/images/icon/up.png NOT FOUND  
{hostgator}/images/icon/down.png ANOTHER ICON (it’s not n the  
folder…)

Thank You! 🙂

---

<div class="post-metadata">

**Author:** ![MEK](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/f08c70/32.png) [@MEK](https://www.ruby-forum.com/u/MEK)\
**Post date:** [July 23, 2008, 10:29pm UTC](https://www.ruby-forum.com/t/rails-rewrite-rule-on-mod-rails/143904/2 "2008-07-23T22:29:46Z")

</div>

SOLVED!

I just needed to wait a little bit and apache beahaves correctly with  
.htaccess… And of course I also found and “Alias” path directive in  
httpd.conf for /icons/ redirecting somewhere different… 🙂

see ya
