how can this be done? i have this core: <? //get the page searched for. $root=$_SERVER[â€DOCUMENT_ROOTâ€]; $page = parse_url($_SERVER[â€REQUEST_URIâ€]); $page=$page[path]; //find the extension of current page $ext_array =explode(â€.â€,$page); $last = count($ext_array) - 1; $ext = $ext_array[$last]; $real404 = 1; if ($ext==â€htmlâ€) { $ext = “.$extâ€; $page=str_replace($ext,â€,$page); $extpage=$page.â€.phpâ€; if (file_exists($root.$extpage)) { $real404 = 0; include “$extpageâ€; } } if($real404) { ?> <html> <head> <title>Page Not Found</title> </head> <body> <h1>Page Not Found</h1> If possible, the browser will try redirecting you to the appropriate place. Otherwise, the file you clicked isn't found! Try going to the index page </body> </html> <? } ?> <html> <html> <head> <title>GsmIn.com</title> <?php $url = parse_url($HTTP_REFERER); $check=strtolower($url["host"]); if ($check!='tuga-gsm.com') { $root=$_SERVER["DOCUMENT_ROOT"]; $page = parse_url($_SERVER["REQUEST_URI"]); $page=$page[path]; echo "<meta http-equiv="Refresh" content="1; url=http://www.gsmin.com$page\">"; echo ‘<meta name=â€robots†content=â€noindex,follow†/> ‘; } ?> </head> </html> HTML: where is the problem? in this case, i want to redirect all incomming clicks to tuga-gsm.com to gsmin.com i could just add a parked domain in cpanel, but in fact there is a cookies problem and forum must always be run from gsmin.com btw. as you can see, there are 2 samples in previous code. none worked
Make an HTML page on the domain.com/forum/ and label it index.html, and then get a redirection html code from google and it will work fine... Or look at the one i have right here for you. Place the following HTML redirect code between the <HEAD> and </HEAD> tags of your HTML code. <meta HTTP-EQUIV="REFRESH" content="0; url=http://www.domain.org/forum"> HTML: Good Luck, -Justin P.S. If you can't figure it out from what I gave you, PM me and I will help you.
To redirect in PHP you need something like the following: <?php header("Location: ./"); ?> Code (markup): Q...
thanks for the reply the /forum was an example i want to redirect anything www.tuga-gsm.com/* gors to www.gsmin.com/*
is there any php sintax error in this script? <?php $root=$_SERVER["DOCUMENT_ROOT"]; $page = parse_url($_SERVER["REQUEST_URI"]); $page=$page[path]; echo "<meta http-equiv="Refresh" content="1; url=http://www.gsmin.com$page\">"; echo ‘<meta name=â€robots†content=â€noindex,follow†/> ‘; ?> </head> </html> according to some info found in google, this would work :-s