【发布时间】:2014-07-10 01:36:03
【问题描述】:
我使用的是 bluehost 共享服务器
它应该是一个显示在根域 domainname.com 中
rails 文件位于:
public_html/app_name/current
我的 public_html/.htaccess 有:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www.)?domainname.com$
RewriteCond %{REQUEST_URI} !^/app_name/current/public/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /app_name/current/public/$1
RewriteCond %{HTTP_HOST} ^(www.)?domainname.com$
RewriteRule ^(/)?$ /app_name/current/public/ [L]
我的 public_html/app_name/current/public/.htaccess 有:
Allow from all
Options -MultiViews
PassengerResolveSymlinksInDocumentRoot on
RailsEnv production
RackBaseURI /public_html/app_name/current
SetEnv GEM_HOME /home1/username/ruby/gems
【问题讨论】:
标签: ruby-on-rails ruby apache .htaccess deployment