node.js - express - nodejs - Keep URL if in a subdomain instead of redirecting -
My current set is such that Use it, I am sure that This is OK , but ideally I like that the subdomain remains in tact. I have not found any way to redirect URL, keeping the same. Redirect means to go to another URL. There is no way to keep the original URL, the only way to keep it is to map the subdomain to the same path or to use the parameter / reggae in the subdomain name. Express allows it completely: app.get ('/: subdomain.test.com/' or app.get (regesx (...)) In this way your call says that such callback Redirection is not called in your code and you serve all subdomains. Or, use it http://test.com/project indicates something Original index view.
http://mysubdomain.test.com redirects to the above URL.
Comments
Post a Comment