# .htaccess configuration

**URL:** <https://www.ruby-forum.com/t/htaccess-configuration/120944>\
**Category:** Rails\
**Created:** [November 22, 2007, 12:18am UTC](https://www.ruby-forum.com/t/htaccess-configuration/120944 "2007-11-22T00:18:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![oskopik](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/o/9e8a1a/32.png) [@oskopik](https://www.ruby-forum.com/u/oskopik)\
**Post date:** [November 22, 2007, 12:18am UTC](https://www.ruby-forum.com/t/htaccess-configuration/120944/1 "2007-11-22T00:18:31Z")

</div>

hello,

i use shared hosting with apache and .htacces file for configuration.

.htaccess file is places in the rails project folder:

* * *

RewriteEngine On  
RewriteRule ^$ public/index.html [L]

RewriteCond %{REQUEST\_URI} !^/project/public  
RewriteRule ^(.\*)$ public/$1 [L]

## RewriteCond %{REQUEST\_FILENAME} !-f RewriteRule ^(.\*)$ public/dispatch.fcgi/$1 [QSA,L]

Everything work fine except that, I can’t call the controller like this:  
[http://xxxxxxxxx.net/project/controller](http://xxxxxxxxx.net/project/controller)

## Error Message is:

## The page you were looking for doesn’t exist. You may have mistyped the address or the page may have moved.

But i can call the controller like this:  
[http://xxxxxxxxx.net/project/public/controller](http://xxxxxxxxx.net/project/public/controller)

how can i solve the problem?

thanx  
otis
