Checking Redirects

From Anna, 11 Months ago, written in Bash, viewed 118 times.
URL https://anna.fyi/view/43a0ee1b Embed
Download Paste or View Raw
  1. #!/bin/bash
  2. read -p 'What is the base domain to check redirects for? ' DOMAIN
  3.  
  4. echo " "
  5. echo "=============================="
  6. echo " "
  7. echo "Non-www and non-SSL : http://$DOMAIN"
  8. curl -Is http://$DOMAIN | grep -E 'HTTP|Location'
  9. echo " "
  10. echo "=============================="
  11. echo " "
  12. echo "www and non-SSL : http://www.$DOMAIN"
  13. curl -Is http://www.$DOMAIN | grep -E 'HTTP|Location'
  14. echo " "
  15. echo "=============================="
  16. echo " "
  17. echo "Non-www and SSL : https://$DOMAIN"
  18. curl -Is https://$DOMAIN | grep -E 'HTTP|Location'
  19. echo " "
  20. echo "=============================="
  21. echo " "
  22. echo "www and SSL : https://www.$DOMAIN"
  23. curl -Is https://www.$DOMAIN | grep -E 'HTTP|Location'
  24. echo " "
  25. echo "=============================="

Reply to "Checking Redirects"

Here you can reply to the paste above