Accessing the same PHP code though different folders

23 hours ago 3
ARTICLE AD BOX

I recently deployed a single-file, very simple PHP application that needs to be accessible via different folder paths depending on the source operating system. Since I can't change the code of the source applications that access mine, I had to make it available in different folder structures:

http://newestappname.myddomain/index.php http://oldappname.myddomain/appnew/v1.1/index.php http://oldestappname.myddomain/app/v1/index.php

For now, I hosted the application at /var/www/html/index.php and created symbolic links to it in the other folders, which worked fine (my deadline was too close). However, it may be a problem when storing it on Git. I was wondering if there was a better/smarter way to do it, such as changing Apache2 settings or using an .htaccess file and mod_rewrite. What would you recommend? How could I implement it?

Thanks!

Read Entire Article