Re: Location ....

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Christian Ista escreveu:
Hello,

Could you tell me a efficient solution for change page (new location) in
PHP? I tried this code : header("Location: mypage.php");

-----
If you are at Apache environment, the best choice is to redirect 301 our 302 via .htaccess.

redirect 301 -> for pages/files permanently moved.
redirect 302 -> for pages/files temporaly moved.

Create one .htaccess ( or edit existing one ) at your root server.

Place the code line in the .htacess:


redirect 301 /folder_to/old_file.html http://www.yoursite.com/new_file.html

For a new redirect, skip one line.

Upload the .htaccess and try to reach the old file via browser.

----
zerof

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux