# RewriteRule with scgi on Apache 2

**URL:** <https://www.ruby-forum.com/t/rewriterule-with-scgi-on-apache-2/54870>\
**Category:** Ruby\
**Created:** [March 14, 2006, 10:26pm UTC](https://www.ruby-forum.com/t/rewriterule-with-scgi-on-apache-2/54870 "2006-03-14T22:26:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [March 14, 2006, 10:26pm UTC](https://www.ruby-forum.com/t/rewriterule-with-scgi-on-apache-2/54870/1 "2006-03-14T22:26:46Z")

</div>

Hi.  
I want to direct all access of “/” to index.html  
I tried many things, but it doesn’t work.  
Like:

RewriteRule ^$ index.html [QSA]  
RewriteRule ^/$ /var/www/public/index.html [R]

If I access /index.html, everything works fine.  
I don’t have scgi-bin or dispatch.scgi on my Linux ES4.  
Is that normal?  
It will be very helpful if somebody can provide a httpd.conf file and  
…htaccess file.  
Thank you,

---

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [March 14, 2006, 10:44pm UTC](https://www.ruby-forum.com/t/rewriterule-with-scgi-on-apache-2/54870/2 "2006-03-14T22:44:02Z")

</div>

On Wed, Mar 15, 2006 at 06:23:46AM +0900, removed\_email\_address@domain.invalid wrote:

> Is that normal?  
> It will be very helpful if somebody can provide a httpd.conf file and  
> …htaccess file.

You don’t need a RewriteRule, you need DirectoryIndex.

DirectoryIndex index.html

Steve P.  
removed\_email\_address@domain.invalid

---

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [March 16, 2006, 4:44pm UTC](https://www.ruby-forum.com/t/rewriterule-with-scgi-on-apache-2/54870/3 "2006-03-16T16:44:24Z")

</div>

Thank you for your message.  
I do have DirectoryIndex in httpd.conf.  
But after I run RubyOnRails, the configuration stopped working.  
I am trying to run RubyOnRails with scgi on RedHat ES4.
