Re: How do I rewrite a url for requests from one domain to another?

2011-02-11 Thread Volkan Unsal
When I did that, and redirected from one app to another, the url did not
change although it did redirect. And when I clicked around the links on the
site, the url *still* didn't change.

I don't know what to make of that



On Sun, Feb 6, 2011 at 5:15 PM, Trevor Turk  wrote:

> On Friday, February 4, 2011 2:53:00 PM UTC+1, Scott Watermasysk wrote:
>>
>> You might also want to check out RackRewrite which has lots of great
>> features.
>>
>
> I'm just redirecting one heroku app to another like so:
>
> https://github.com/trevorturk/almosteffortless/blob/master/config.ru
>
> I think it's very nice and simple ;)
>
> --
> You received this message because you are subscribed to the Google Groups
> "Heroku" group.
> To post to this group, send email to heroku@googlegroups.com.
> To unsubscribe from this group, send email to
> heroku+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/heroku?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Heroku" group.
To post to this group, send email to heroku@googlegroups.com.
To unsubscribe from this group, send email to 
heroku+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/heroku?hl=en.



Re: How do I rewrite a url for requests from one domain to another?

2011-02-06 Thread Trevor Turk
On Friday, February 4, 2011 2:53:00 PM UTC+1, Scott Watermasysk wrote:
>
> You might also want to check out RackRewrite which has lots of great 
> features. 
>

I'm just redirecting one heroku app to another like so:

https://github.com/trevorturk/almosteffortless/blob/master/config.ru

I think it's very nice and simple ;)

-- 
You received this message because you are subscribed to the Google Groups 
"Heroku" group.
To post to this group, send email to heroku@googlegroups.com.
To unsubscribe from this group, send email to 
heroku+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/heroku?hl=en.



Re: How do I rewrite a url for requests from one domain to another?

2011-02-04 Thread Scott Watermasysk
You might also want to check out RackRewrite which has lots of great features. 

On Feb 4, 2011, at 2:45 AM, John Beynon  wrote:

> yep, it's redirect inside routes is a 301 redirect by default -
> 
> https://github.com/rails/rails/blob/master/actionpack/lib/action_dispatch/routing/redirection.rb
>  - line 41
> 
> John.
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Heroku" group.
> To post to this group, send email to heroku@googlegroups.com.
> To unsubscribe from this group, send email to 
> heroku+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/heroku?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Heroku" group.
To post to this group, send email to heroku@googlegroups.com.
To unsubscribe from this group, send email to 
heroku+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/heroku?hl=en.



Re: How do I rewrite a url for requests from one domain to another?

2011-02-03 Thread John Beynon
yep, it's redirect inside routes is a 301 redirect by default -

https://github.com/rails/rails/blob/master/actionpack/lib/action_dispatch/routing/redirection.rb
 - 
line 41

John.

-- 
You received this message because you are subscribed to the Google Groups 
"Heroku" group.
To post to this group, send email to heroku@googlegroups.com.
To unsubscribe from this group, send email to 
heroku+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/heroku?hl=en.



Re: How do I rewrite a url for requests from one domain to another?

2011-02-03 Thread Volkan Unsal
Oh cool. But does that send 301 header to indicate it's permanently
moved, so Google doesn't index it?



On Feb 3, 6:34 pm, Mike Abner  wrote:
> We have something like this that would probably work for you in our
> routes.rb file.
>
> if Rails.env.production?
>     hostname = 'my_canonical_url.com'
>     constraints(WwwConstraint.new(hostname)) do
>       root :to => redirect("http://www.#{hostname}";)
>       match '/*path', :to => redirect {|params| 
> "http://www.#{hostname}/#{params[:path]}"}
>     end
> elsif Rails.env.staging? ...
>
> Mike
>
> On Thu, Feb 3, 2011 at 2:36 PM, Volkan Unsal  wrote:
> > I have two domain names assigned to my heroku app. I want to make sure
> > that all requests to one domain are permanently redirected to the
> > other domain. How can I do that on Heroku?
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Heroku" group.
> > To post to this group, send email to heroku@googlegroups.com.
> > To unsubscribe from this group, send email to
> > heroku+unsubscr...@googlegroups.com
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/heroku?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Heroku" group.
To post to this group, send email to heroku@googlegroups.com.
To unsubscribe from this group, send email to 
heroku+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/heroku?hl=en.



Re: How do I rewrite a url for requests from one domain to another?

2011-02-03 Thread Mike Abner
We have something like this that would probably work for you in our
routes.rb file.

if Rails.env.production?
hostname = 'my_canonical_url.com'
constraints(WwwConstraint.new(hostname)) do
  root :to => redirect("http://www.#{hostname}";)
  match '/*path', :to => redirect {|params| "
http://www.#{hostname}/#{params[:path]}"}
end
elsif Rails.env.staging? ...

Mike

On Thu, Feb 3, 2011 at 2:36 PM, Volkan Unsal  wrote:

> I have two domain names assigned to my heroku app. I want to make sure
> that all requests to one domain are permanently redirected to the
> other domain. How can I do that on Heroku?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Heroku" group.
> To post to this group, send email to heroku@googlegroups.com.
> To unsubscribe from this group, send email to
> heroku+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/heroku?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Heroku" group.
To post to this group, send email to heroku@googlegroups.com.
To unsubscribe from this group, send email to 
heroku+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/heroku?hl=en.



How do I rewrite a url for requests from one domain to another?

2011-02-03 Thread Volkan Unsal
I have two domain names assigned to my heroku app. I want to make sure
that all requests to one domain are permanently redirected to the
other domain. How can I do that on Heroku?

-- 
You received this message because you are subscribed to the Google Groups 
"Heroku" group.
To post to this group, send email to heroku@googlegroups.com.
To unsubscribe from this group, send email to 
heroku+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/heroku?hl=en.