Donate. I desperately need donations to survive due to my health

Get paid by answering surveys Click here

Click here to donate

Remote/Work from Home jobs

Why does a header redirect to a new domain contain the first domain in url?

I have numerous domains reading from a single index.php. I want to use a subdomain as a logged in domain. After passing credentials to log in (this is working) I need to redirect from domain to subdomain. No matter what I do ends up domain1.com/subdomain.com. The configuration file reads the incoming $_SERVER['HTTP_HOST']; and matches it to a list to run site. I am using header("Location: $url"); to send to logged subdomain from original domain. I have tried header refresh, javascript with window location replace,.. nothing is working.

Comments