Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8415215
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T01:22:49+00:00 2026-06-10T01:22:49+00:00

I want to create a network like stackexchange just with subdomains. for example subdomain1.test.com

  • 0

I want to create a network like stackexchange just with subdomains.

for example

subdomain1.test.com
subdomain2.test.com
subdomain3.test.com
subdomain4.test.com

I also want to have all websites in one app so I can scale and service them easier.

How do I do this in play2?

Can i specify a subdomain in routes?

pseudo code

GET     subdomain1/                           controllers.Application.index()
GET     subdomain2/                           controllers.Application.index()
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T01:22:51+00:00Added an answer on June 10, 2026 at 1:22 am

    It will not work: if router contains two routes with the same type and target action it will use only first. For fastest solution you can just create a wrapping method(s), which will do what you need and use them on the view/controller level:

    route

    GET   /home    controllers.Application.index
    

    Application controller

    public static String linkMeta(play.api.mvc.Call path) {
        return "http://meta.domain.tld" + path;
    }
    

    Template samples:

    <a href='@Application.linkMeta(routes.Application.index)'>Absoulte URL link to meta's index</a>
    URL: http://meta.domain.tld/home
    
    <a href='@routes.Application.index'>Relative URL to meta's index</a>
    URL: /home
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to create a little social network (a little test). How can Ii
I'm setting up a wifi network for a company, i want to create a
Can I create a junit environment without file system and network access? I want
I'm trying to create a social-network like feature in an app I'm building, and
I want to create a network of sites on the WordPress platform. Apartment Therapy
I want to create an android application that acts like a proxy, all Internet
I want to create a feed-forward neural network where the outputs in the training
I am trying to create something like a Network Manager using NSUrlConnections. For that,
I've got a network of websites that I want to create single sign-on functionality
I have a new social-network like web app coming up, and I want a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.