Host suggesting problem with .htaccess
Installation and Configuration
If the issue started with a change to the item_detail.tpl of youtube, that would be my best guess as to where to look to start with.
I'd be REAL surprised to hear that altering the item_detail.tpl file caused the .htaccess file to start having issues. (sarcasm, thats not the issue!!!!)
https://www.lifewire.com/502-bad-gateway-error-explained-2622939
What were you trying to add? some javascript? then the issue is probably it needs {literals}
Docs: "{literal}{/literal}"
https://www.jamroom.net/the-jamroom-network/documentation/module-developer-guide/3011/literal-literal
I'm about to go to bed now, so doing a server setup could be a push. The site is easiest to move to jamroom hosting when it is up. There is a hosting transfer module that lets it import right in, but if the site isn't up, that method isn't an option.
Docs: "Hosting Transfer"
https://www.jamroom.net/the-jamroom-network/documentation/modules/2960/hosting-transfer