开发者

Access Rails under /app/, not /app/public/

I'm trying to deploy Rails 2.1.2 with Apache 2.2.10 and FastCGI (yeah, bad, ancient, ugly, I know). And I know it's no programming开发者_JS百科 question, but please bear with me.

My application can be accessed via example.com/app/public/, but I want to access it via example.com/app/.

In my .htaccess-File (in the app/-directory!) I have:

RewriteEngine On

RewriteBase /app/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ public/dispatch.fcgi [QSA,L]

How can I forward each request going to app/ to app/public/? Every time I try this (like, with RewriteRule ^.*$ public/$1 [QSA]) I get a routing error:

No route matches "/app/" with {:method=>:get}

Help?


Installing passenger either with apache or with nginx is by far, less work than finding the answer to this issue.

And I know it's no exactly an answer, but please bear with me ;)

No, seriously, try: http://www.modrails.com/install.html

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜