We have a development server which we use while developing LAMP applications.
We also have a production server where our websites are deployed.
Occasionally, when deploying websites on the production server, we forgot to update certain paths. Occasionally we find that a production website is still referencing images, scripts and stylesheets on the development server. It can be tricky to detect these path issues and I am looking for creative ways to help detect these incorrect paths.
1) We can block all access from the development server to the production server. This would allow us to more easily detect incorrect paths as it would cause an error or broken image, rather then appearing fine.
2) Another option is we could prevent any external website from linking to images on the development server. (http://altlab.com/htaccess_tutorial.html). Any links to an image on the development server could be replaced with an image with says something like, "INCORRECT PATH" etc.
What other options are there?
(Note: I agree that the goal is to PREVENT these paths issues from occurring on the production server in the first place which can be done using code versioning and deployment tools, etc. However, in this conversation I am specifically looking for ways to detect these paths issues. It is an extra layer of quality control I am looking for...)