You are here: Re: Location .... « PHP « IT news, forums, messages
Re: Location ....

Posted by zerof on 12/31/05 15:40

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

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация