-2

An outside company is building a website for our client as we are building the web app with dashboards. The website will have a "login" button which we will set up a subdomain to point to our server. It will look like this, dashboard.example.com. Our web app is on a server and has its own urls like so example.org/admin, example.org/admin/createuser, so my question is, when we point the subdomain to our server will the urls still work?

Example (will the urls be valid) dashboard.example.com/admin or dashboard.example.com/admin/createuser

Thanks

AD7six
  • 2,920
  • 2
  • 21
  • 23
Naterade
  • 99
  • 4
  • 2
    If you do it correctly it should work. But you would have to actually give some specifics in order for anyone to help you further. Also, do **not** use a made-up website that you don't own - if you don't want to use your own, you should use `example.com` since that will never belong to anyone else. – Jenny D Jan 04 '15 at 19:57
  • Jenny adds a great point. That's exactly why I used example.com and example.org in my answer. – Phil Hollenback Jan 04 '15 at 20:08
  • Are you asking if the urls for your web app (`server.com/admin`) will work on the domain for "a website" (`dashbord.website.com`) ? Do you _want_ them to? It's easier to understand what you want if you ask _how_ to do something rather than what-if/will-it-work. – AD7six Jan 04 '15 at 20:42

1 Answers1

2

URLs are relative to the server they are hosted on. So if someone goes to http://dashboard.example.com/admin, that request will go to the server dashboard.example.com. That server can then redirect the request to some other server (say http://dashboard.example.org/admin/createuser).

So the short answer is that you need to configure your webservers correctly to redirect requests as necessary. If you are using the apache webserver, one way to do this is with mod_rewrite. Another is to use the refresh meta tag on your page.

Phil Hollenback
  • 14,947
  • 4
  • 35
  • 52
  • Hi Phil, thanks for answering. I'm going to try this and look into mod_rewrite and I'll get back to you if it works. – Naterade Jan 04 '15 at 20:04