redirect - php query string header -
hello have problem header('location: http://www.example2.com/');
while there query string.
ok make question easy understand:
now have domain name http://example1.com/?url=url
want when want access example1.com redirects him example2.com if types example1.com/?url=url nothing happen how can please , in advance
what use redirecting? post's first line assume, you're redirecting user via php header
function. so, check in php whether there query string or not:
<?php if (empty($_server["query_string"])) { header("location: http://www.example2.com/"); } ?>
Comments
Post a Comment