# No default .htaccess

**URL:** <https://discuss.rubyonrails.org/t/no-default-htaccess/51807>\
**Category:** rubyonrails-talk\
**Created:** [May 21, 2010, 1:49am UTC](https://discuss.rubyonrails.org/t/no-default-htaccess/51807 "2010-05-21T01:49:36Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![11155](https://avatars.discourse-cdn.com/v4/letter/1/d26b3c/32.png) [@11155](https://discuss.rubyonrails.org/u/11155)\
**Post date:** [May 21, 2010, 1:49am UTC](https://discuss.rubyonrails.org/t/no-default-htaccess/51807/1 "2010-05-21T01:49:36Z")

</div>

Hey all!

I just created my first RoR project (following this guide [http://wiki.rubyonrails.org/start](http://wiki.rubyonrails.org/start)), and I had some trouble getting everything to work under apache with passenger. After some debugging I found out I simply didn't had any .htaccess in my public/ folder. People around the interwebz seemed to imply there should be one by default, so my questions are :

- Why wasn't there one created with my application? - Also, I didn't have any problem when I ran my application using webrick. How come?

Thanks.

---

<div class="post-metadata">

**Author:** ![Frederick\_Cheung](https://sea2.discourse-cdn.com/rubyonrails/user_avatar/discuss.rubyonrails.org/frederick_cheung/32/3901_2.png) [@Frederick\_Cheung](https://discuss.rubyonrails.org/u/Frederick_Cheung)\
**Post date:** [May 21, 2010, 10:00am UTC](https://discuss.rubyonrails.org/t/no-default-htaccess/51807/2 "2010-05-21T10:00:45Z")

</div>

> Hey all!
> 
> I just created my first RoR project (following this guidehttp://wiki.rubyonrails.org/start), and I had some trouble getting everything to work under apache with passenger. After some debugging I found out I simply didn't had any .htaccess in my public/ folder. People around the interwebz seemed to imply there should be one by default, so my questions are :

You don't need a .htaccess in public for passenger (in fact with an older app that I migrated to passenger recently, the old .htaccess was there stopped passenger from working). It was removed because it was only used for fastcgi which is pretty much obsolete as a method for deploying rails apps

Fred

---

<div class="post-metadata">

**Author:** ![11155](https://avatars.discourse-cdn.com/v4/letter/1/d26b3c/32.png) [@11155](https://discuss.rubyonrails.org/u/11155)\
**Post date:** [May 21, 2010, 1:52pm UTC](https://discuss.rubyonrails.org/t/no-default-htaccess/51807/3 "2010-05-21T13:52:02Z")

</div>

Frederick Cheung wrote:

> > Hey all!
> > 
> > I just created my first RoR project (following this guidehttp://wiki.rubyonrails.org/start), and I had some trouble getting everything to work under apache with passenger. After some debugging I found out I simply didn't had any .htaccess in my public/ folder. People around the interwebz seemed to imply there should be one by default, so my questions are :
> 
> You don't need a .htaccess in public for passenger (in fact with an older app that I migrated to passenger recently, the old .htaccess was there stopped passenger from working). It was removed because it was only used for fastcgi which is pretty much obsolete as a method for deploying rails apps
> 
> Fred

Okay... then let me describe the issue I had with passenger (and not with webrick), I guess the problem lies elsewhere : in the 'First application' part of the wiki, you create a table and the correspondent controller and views. I just can't access this controller, I get an error 500 from apache. Furthermore, when I checked the log, I get this :

[Thu May 20 21:07:08 2010] [error] [client 127.0.0.1] Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace. [Thu May 20 21:07:08 2010] [debug] core.c(3063): [client 127.0.0.1] r-\>uri = /index.php [Thu May 20 21:07:08 2010] [debug] core.c(3069): [client 127.0.0.1] redirected from r-\>uri = /index.php [Thu May 20 21:07:08 2010] [debug] core.c(3069): [client 127.0.0.1] redirected from r-\>uri = /index.php [Thu May 20 21:07:08 2010] [debug] core.c(3069): [client 127.0.0.1] redirected from r-\>uri = /index.php [Thu May 20 21:07:08 2010] [debug] core.c(3069): [client 127.0.0.1] redirected from r-\>uri = /index.php [Thu May 20 21:07:08 2010] [debug] core.c(3069): [client 127.0.0.1] redirected from r-\>uri = /index.php [Thu May 20 21:07:08 2010] [debug] core.c(3069): [client 127.0.0.1] redirected from r-\>uri = /index.php [Thu May 20 21:07:08 2010] [debug] core.c(3069): [client 127.0.0.1] redirected from r-\>uri = /index.php [Thu May 20 21:07:08 2010] [debug] core.c(3069): [client 127.0.0.1] redirected from r-\>uri = /index.php [Thu May 20 21:07:08 2010] [debug] core.c(3069): [client 127.0.0.1] redirected from r-\>uri = /index.php [Thu May 20 21:07:08 2010] [debug] core.c(3069): [client 127.0.0.1] redirected from r-\>uri = /users

Also, here's what I've got in my apache configuration :

NameVirtualHost 127.0.0.1:3000

Listen 127.0.0.1:3000

\<VirtualHost 127.0.0.1:3000\> &nbsp;&nbsp;DocumentRoot "/home/simon/projet-web/blog/public" &nbsp;&nbsp;DirectoryIndex index.html &nbsp;&nbsp;LogLevel debug &nbsp;&nbsp;RailsEnv development

&nbsp;&nbsp;\<Directory "/home/simon/projet-web/blog/public"\> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;AllowOverride All &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Options -MultiViews &nbsp;&nbsp;\</Directory\> \</VirtualHost\>

Thanks again!

---

<div class="post-metadata">

**Author:** ![Frederick\_Cheung](https://sea2.discourse-cdn.com/rubyonrails/user_avatar/discuss.rubyonrails.org/frederick_cheung/32/3901_2.png) [@Frederick\_Cheung](https://discuss.rubyonrails.org/u/Frederick_Cheung)\
**Post date:** [May 22, 2010, 3:05am UTC](https://discuss.rubyonrails.org/t/no-default-htaccess/51807/4 "2010-05-22T03:05:43Z")

</div>

Are you sure there's not some other stuff (eg some rewrite rules) that be being used - I don't see how just the above + your rails app would be doing redirects to a .php url

Fred

---

<div class="post-metadata">

**Author:** ![11155](https://avatars.discourse-cdn.com/v4/letter/1/d26b3c/32.png) [@11155](https://discuss.rubyonrails.org/u/11155)\
**Post date:** [May 22, 2010, 6:49pm UTC](https://discuss.rubyonrails.org/t/no-default-htaccess/51807/5 "2010-05-22T18:49:44Z")

</div>

Frederick Cheung wrote:
