I need to test whether some javascript I wrote that checks the url on a production site will work before I deploy it there. The url check is pretty basic.
window.location.hostname === "prodlogin.site.com"
But the test url I have is different than production and I don't want to add all our test, dev, uat, staging login links to the production assets.
The url that the test site is on is testlogin.site.com
How would I go about testing this locally on my machine. I need the url to say prodlogin.site.com but I need the files to come from testlogin.site.com.
Host? Apache config? .htaccess?
Aucun commentaire:
Enregistrer un commentaire