![]() |
Multiple sites & linking to assets - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Multiple sites & linking to assets (/showthread.php?tid=27232) |
Multiple sites & linking to assets - El Forum - 02-04-2010 [eluser]Anonymous[/eluser] Hi, I've got the following problem: I have a local development webserver running with this setup: Code: -www Each client map has its own .htacces like this: Code: RewriteEngine on This way i can upload a clients map directly to a clients production server, with minimal changes. Now i want to link in my view files to images like this: Code: <img src="/assets/test.jpg"> but!, and here's my problem: this way the images wil link on my development server to: /assets/test.jpg instead of /CLIENT1/assets/test.jpg Is there a way to redirect all calls from /assets/ to {CLIENT}/assets/ ? my .htacces knowledge is really to short on this Multiple sites & linking to assets - El Forum - 02-04-2010 [eluser]danmontgomery[/eluser] They could be set up as virtualhosts in apache, where you can specify documentroot... You might be able to specify a 301 redirect in htaccess, but I can't help with that. Multiple sites & linking to assets - El Forum - 02-04-2010 [eluser]Anonymous[/eluser] hmm i think i was explaining it bad ![]() All i want is a request that is made to: Code: http://localhost/assets/images/test.jpg Code: http://localhost/CLIENT1/controller/view Code: http://localhost/CLIENT1/assets/images/test.jpg where CLIENT1 is variable Multiple sites & linking to assets - El Forum - 02-07-2010 [eluser]Anonymous[/eluser] Ok, that was stupid. What i wanted was multiple virtual hosts in Apache. (as noctrum suggested) All works fine now, thanks. |