Hey, I'm try to make a redirection script any idea how to make it? Here's a sample link: http://mysite.com/test/?id=1 it will be redirected to http://mysite.com/test2/main.php or http://mysite.com/test/?1 it will be redirected to http://mysite.com/test2/main.php Any idea how can I make that kind of redirection without adding a test folder with a php file on it to redirect the page? Is that possible?
I think you really want to use mod_rewrite. See the FAQ at the top of the Apache forum. Otherwise, you'd have something like this in the file 'test/index.php': $newplace = '/test2/main.php'; header('HTTP/1.1 301 Moved Permanently'); header("Location: http://" . $_SERVER['SERVER_NAME'] . $newplace ); exit; PHP: Cheers, Cryo.