The routes path *starts* after the domain and port, so you can't
really (as far as I know) route based on the earlier stuff. If you
want to redirect based on that, you'd do it in your web server set-up,
not in Play. Apache lets you set up sub-domains and do rewriting.
Remember that the domain could be spelled out as a name or it could be
an IP address. What would you do if you got the wrong one?
Todd
On Tue, Jun 12, 2012 at 7:20 AM, Timothy Klim <klimt...@gmail.com> wrote:
> Is it really hard to do?
>
>
> On Monday, June 11, 2012 11:26:40 PM UTC+4, Timothy Klim wrote:
>>
>> Hi!
>>
>> I read past topics and trying to use subdomain in my play app:
>> app1.myapps.com:9000
>> with routes:
>> GET {domain}.myapps.com/
>> controllers.Apps.index(domain)
>>
>> and I got other index page or error.
>>
>> What I do wrong?
>
> --
> You received this message because you are subscribed to the Google Groups
> "play-framework" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/play-framework/-/V_zXmnf6vkwJ.
>
> To post to this group, send email to play-framework@googlegroups.com.
> To unsubscribe from this group, send email to
--
You received this message because you are subscribed to the Google Groups "play-framework" group.
To view this discussion on the web visit https://groups.google.com/d/msg/play-framework/-/V_zXmnf6vkwJ.
To post to this group, send email to play-fr...@googlegroups.com.
To unsubscribe from this group, send email to play-framewor...@googlegroups.com.
You can't do that directly in the router in Play 2.0 anymore (and it is expected, it was a very bad idea).It is easy to handle via classical action composition and reading the request.host value.
On 12 juin 2012, at 13:20, Timothy Klim <klimt...@gmail.com> wrote:
Is it really hard to do?
On Monday, June 11, 2012 11:26:40 PM UTC+4, Timothy Klim wrote:Hi!--I read past topics and trying to use subdomain in my play app: app1.myapps.com:9000with routes:GET {domain}.myapps.com/ controllers.Apps.index(domain)and I got other index page or error.What I do wrong?
You received this message because you are subscribed to the Google Groups "play-framework" group.
To view this discussion on the web visit https://groups.google.com/d/msg/play-framework/-/V_zXmnf6vkwJ.
To post to this group, send email to play-framework@googlegroups.com.
To unsubscribe from this group, send email to play-framework+unsubscribe@googlegroups.com.
You can't do that directly in the router in Play 2.0 anymore (and it is expected, it was a very bad idea).It is easy to handle via classical action composition and reading the request.host value.
On 12 juin 2012, at 13:20, Timothy Klim <klimt...@gmail.com> wrote:
Is it really hard to do?
On Monday, June 11, 2012 11:26:40 PM UTC+4, Timothy Klim wrote:Hi!--I read past topics and trying to use subdomain in my play app: app1.myapps.com:9000with routes:GET {domain}.myapps.com/ controllers.Apps.index(domain)and I got other index page or error.What I do wrong?
You received this message because you are subscribed to the Google Groups "play-framework" group.
To view this discussion on the web visit https://groups.google.com/d/msg/play-framework/-/V_zXmnf6vkwJ.
To post to this group, send email to play-framework@googlegroups.com.
To unsubscribe from this group, send email to play-framework+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/play-framework/-/yqU4K3HSOLgJ.
To post to this group, send email to play-fr...@googlegroups.com.
To unsubscribe from this group, send email to play-framewor...@googlegroups.com.
Just curious, why is it a bad idea to do that in Play! ?