I found a few questions and answers close to what I am trying to solve, but not quite. I see references to using mod_rewrite to change url paths without redirection. But, what I am looking for is, if it is even possible, to change a subdomain path(url) to read as a subdirectory url anytime different pages for that subdomain is called. To be more specific I want subdomain.example.com/idx/search/page to automatically show in the address bar as example.com/idx/search/page without redirection. Is this possible?
-
not without mod_rewrite just off the top of my head – td512 May 21 '16 at 16:04
-
This has been answered many times on Stackoverflow: stackoverflow.com/questions/824349/… – Julie Pelletier May 21 '16 at 17:08
Not likely! When the "change" shows in the browser address bar, it is because the server has sent a "redirection header" to the client (i.e. browser) with response code 301, 302, etc. instructing the client to send the request again to the correct address. The client will then, of course, hit the server with that address and if it is not valid the server will respond with 403, 404, etc.