Hi, I'm trying to code a little script which will allow me to redirect links from my website using a redirect script. I need the script to redirect like this: redirect.php?http://www.url.com i have tried this redirect.php?url=http://www.url.com however this has problems with the urls when redirected. if you need anymore information please ask.
max2010, that wont work. You need to call the header() function and send the 301 header, then the Location header. Don't forget to exit after, if there is still more processing for it to after, the script will continue running and eating up server resources despite the fact that the client has already been redirected away and wont see the output of that page. <?php header('HTTP/1.1 301 Moved Permanently'); header('Location ' . $_GET['url']); exit; ?> PHP:
Hi, Try this Code to Redirect your URL <?php header("Location: http://www.redirecturl.com/"); ?>[CODE][CODE] Code (markup): [/CODE][/CODE]