I am trying to build a multi-app CodeIgniter site, where the assets for all apps will be stored in a single folder called “assets.” Inside this single folder, each app would have its own asset folder. So, if this is my root directory…
user_guide apps_folder (this is where all my application folders live) system assets
...the assets folder will be organized thus:
assets myapp1 js img css media
Here is my challenge. I am trying to write an apache directive that would rewrite all requests for files ending in css, js, png and gif to the respective asset directory for that app. But the user cannot know the exact location of those assets in the server. To give you an example:
Here is the request: www.myapp1.com/js/jquery.js
The file is located in: assets/myapp1/js
The directive will check for a) the domain address b) file extension
...and based on those variables, will rewrite the url, thereby hiding thee real location of the asset, and make it possible to reference assets as if they were all located at the root of the website. Has anyone ever done something like this?
thanks,