herculesnetwork

my redirect 301 via php question

Oct 20th, 2017
168
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 2.10 KB | None | 0 0
  1. test result:
  2.  
  3. curl -v http://mydomain.com/ainvailiduri/
  4. *   Trying 222.22.22.22...
  5. * Connected to mydomain.com (222.22.22.22) port 80 (#0)
  6. > GET /ainvailiduri/ HTTP/1.1
  7. > Host: mydomain.com
  8. > User-Agent: curl/7.47.0
  9. > Accept: */*
  10. >
  11. < HTTP/1.1 301 Moved Permanently
  12. < Server: nginx/1.10.0 (Ubuntu)
  13. < Date: Fri, 20 Oct 2017 08:03:54 GMT
  14. < Content-Type: text/html; charset=UTF-8
  15. < Transfer-Encoding: chunked
  16. < Connection: keep-alive
  17. < Expires: Wed, 11 Jan 1984 05:00:00 GMT
  18. < Cache-Control: no-cache, must-revalidate, max-age=0
  19. < Location: http://www.mydomain.com/ainvailiduri/
  20. <
  21. * Connection #0 to host mydomain.com left intact
  22.  
  23. the question is still the same, the redirection works, but I do not know how to verify if this is the permanent 301, doing via php, because only redirect does not work, it has to be 301, to ensure that the index will be updated by google. when done by nginx in the way that everyone knows, I am calm, redirect 301 with php. It's the first time I do, and I do not know if that really is the effect.
  24.  
  25. my 301 errors were to send to my them, mydomain.com/404.php page now with the php code of my post, people go to my homepage, it's perfect, but how do I know if this is 301?
  26.  
  27. a Line HTTP / 1.1 301 Moved Permanently in result, is there because that my current domain gets 301 from an old domain, but how do I check if mydomain.com/404.php is being redirected with 301?
  28.  
  29. =========
  30. could be like that?:
  31.  
  32. lanotec@lanotec-Aspire-E1-572:~$ curl -v http://mydomain.com/404.php/ainvailiduri/
  33. *   Trying 222.22.22.22...
  34. * Connected to mydomain.com (222.22.22.22) port 80 (#0)
  35. > GET /404.php/ainvailiduri/ HTTP/1.1
  36. > Host: mydomain.com
  37. > User-Agent: curl/7.47.0
  38. > Accept: */*
  39. >
  40. < HTTP/1.1 301 Moved Permanently
  41. < Server: nginx/1.10.0 (Ubuntu)
  42. < Date: Fri, 20 Oct 2017 08:19:36 GMT
  43. < Content-Type: text/html; charset=UTF-8
  44. < Transfer-Encoding: chunked
  45. < Connection: keep-alive
  46. < Expires: Wed, 11 Jan 1984 05:00:00 GMT
  47. < Cache-Control: no-cache, must-revalidate, max-age=0
  48. < Location: http://www.mydomain.com/404.php/ainvailiduri/
  49. <
  50. * Connection #0 to host mydomain.com left intact
Advertisement
Add Comment
Please, Sign In to add comment