michael-lane
12-26-2005, 01:35 AM
Here is how to redirect your friends to the folder/filename they asked for on google.
<?php
$URL = "http://www.google.com/search?q=".str_replace("/", "", $REQUEST_URI)
header("Location:".$URL);
?>
let me take you through this code. The second line declares the variable $URL as http://www.google.com/search?q= the search engine url then file/folder requested's url without slashes. Then the third line redirects to it in one page load. Of course you can customise this to do other search engines etc. Or to search your own site but theres the bear bones. Go customise.
<?php
$URL = "http://www.google.com/search?q=".str_replace("/", "", $REQUEST_URI)
header("Location:".$URL);
?>
let me take you through this code. The second line declares the variable $URL as http://www.google.com/search?q= the search engine url then file/folder requested's url without slashes. Then the third line redirects to it in one page load. Of course you can customise this to do other search engines etc. Or to search your own site but theres the bear bones. Go customise.
