Ce document intitulé « Redirection PHP (redirect header) » issu de Comment Ça Marche (www.commentcamarche.net) est mis à disposition sous les termes … La Redirection PHP : temporaire et permanente. You can enter any sub-page for the location, this PHP code will redirect users to the test.php sub-page of your website:
I do wonder though how fragments work when a server redirect (via HTTP status 302 and Location: header) is involved. This should be avoided as permanent redirects are more search engine friendly and should be used where possible. My question is really two-fold: If the original URL had a fragment (/original.php#foo), and a redirect is made to /new.php, does the fragment part of the original URL simply get lost? But this would result in a "302 Moved Temporarily" redirect instead of a 301 one. Redirection 301 ou 302 avec PHP (4) . Attention en faisant ce type de redirection avec php, vous allez obtenir une redirection 302, qui peuvent être très mal gérée par les moteurs de recherche. J'envisage d'utiliser le code suivant lors de la phase de lancement d'un site Web pour montrer aux utilisateurs une page de maintenance pour maintenance tout en me montrant le reste du site.. Existe-t-il un moyen d'afficher le statut de redirection 302 correct aux moteurs de recherche ou dois-je rechercher une autre approche basée sur .htaccess? HTTP redirection is a way to point one domain or address to another. Test de redirection; Tweeter; Testez vos redirections web et réponses HTTP. Or does it sometimes get applied to the new URL?