开发者

Rewriting rails url from port 3000?

开发者 https://www.devze.com 2022-12-20 19:44 出处:网络
i have an applicaiton that runs at actionengineers.com:3000. How do i reqwit开发者_如何学Pythone the application to a subdomain or directory (actionengineers.com/myapp) without disturbing the main sit

i have an applicaiton that runs at actionengineers.com:3000. How do i reqwit开发者_如何学Pythone the application to a subdomain or directory (actionengineers.com/myapp) without disturbing the main site of course. i tried to use .htaccess file but i allways get eror 404. here is the code in the .htaccess file.

RewriteEngine on
RewriteCond %{HTTP_HOST} ^www.deep.actionengeneers.com$
RewriteRule ^/?$ "http\:\/\/127\.0\.0\.1\:3000%{REQUEST_URI}" [P,QSA,L]


Try this rule:

RewriteCond %{HTTP_HOST} =www.deep.actionengeneers.com
RewriteRule ^ http://127.0.0.1:3000%{REQUEST_URI} [P,L]

Now all requests to www.deep.actionengeneers.com are getting passed through to 127.0.0.1:3000 via proxy.

0

精彩评论

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

关注公众号