node.js - express - nodejs - Keep URL if in a subdomain instead of redirecting -


My current set is such that http://test.com/project indicates something Original index view.

Use it, I am sure that http://mysubdomain.test.com redirects to the above URL.

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

Comments

Popular posts from this blog

Java - Error: no suitable method found for add(int, java.lang.String) -

java - JPA TypedQuery: Parameter value element did not match expected type -

c++ - static template member variable has internal linkage but is not defined -