I've got a page (menu callback) which serves as a template for an external service. As the HTML of the page is consumed by the external service and rewritten then served from their server, all the CSS and JS paths must be absolute. Elsewhere on my site I use relative paths via AdvAgg, but here I need to rewrite all the link elements to be of the type file, rather than type external.
How can I do this? I have tried doing a hook_css_alter or hook_js_alter and changing type to external and prefixing the data value with my site's base URL but it doesn't seem to be making my AdvAgg aggregate files absolute, their paths stay relative.
Another idea I had was iterating through all the site's CSS files and unsetting the local entries and instead calling drupal_add_js or drupal_add_css but referencing the files as external with an absolute path, but I don't know where I would do this.
I'm using Drupal 7 with CSS and JS aggregation turned on and with the AdvAgg module enabled.
I don't know where I would do this.me neither because you didn't tell us your drupal version.