Visualizzazione dei risultati da 1 a 4 su 4
  1. #1

    come fare per inviare header 301

    ragazzi mi serve di inviare un header 301, quindi anche location.
    però php.net dice che location invia autoamticamente un header 302...

    come faccio?


  2. #2

    Re: come fare per inviare header 301

    Originariamente inviato da xnavigator
    ragazzi mi serve di inviare un header 301, quindi anche location.
    però php.net dice che location invia autoamticamente un header 302...

    come faccio?


    risolto grazie

  3. #3
    Ciao,
    prova

    header("HTTP/1.0 301 Moved Permanently");

    Però l'rfc dice

    301 Moved Permanently

    The requested resource has been assigned a new permanent URL and
    any future references to this resource should be done using that
    URL. Clients with link editing capabilities should automatically
    relink references to the Request-URI to the new reference returned
    by the server, where possible.

    The new URL must be given by the Location field in the response.
    Unless it was a HEAD request, the Entity-Body of the response
    should contain a short note with a hyperlink to the new URL.

    If the 301 status code is received in response to a request using
    the POST method, the user agent must not automatically redirect the
    request unless it can be confirmed by the user, since this might
    change the conditions under which the request was issued.


    Quindi non so come potresti concretamente applicare la terza ipotesi (POST)

    Meglio se riesci a far fare la cosa ad Apache, immagino sia possibile ma non ho mai provato
    per favore NIENTE PVT TECNICI da sconosciuti

  4. #4
    Come hai risolto?
    per favore NIENTE PVT TECNICI da sconosciuti

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2026 vBulletin Solutions, Inc. All rights reserved.