base_url() and css -img-js |
[eluser]Sergiu D[/eluser]
Looks like I've found a workaround, after two days of searching. It's not the best solution and it's not the cleanest one, but at least it keeps my relative links working on a CodeIgniter project. So, to start again, I have the following directory structure: Code: / My .htaccess looks like this, to hide the index.php/ from URL Code: RewriteEngine on Now, because I want to reference all my images, css or JS scripts with relative paths, I've found this HTML tag: Code: <base href="" target=""> It's a HTML 4.01 and XHTML 1.0 and 1.1 valid element. More information about it can be found at: http://www.w3.org/TR/REC-html40/struct/l...tml#h-12.4 http://www.w3schools.com/TAGS/tag_base.asp With CodeIgniter I've done somthing like this: Code: <html> And with this everything seem to work ok for now. Anyway, if somebody know a better way to do it, I'm opened for any suggestion. Thanks... LATER EDIT: Thank you, InsiteFX, seem like both of us came up with the same solution. Thanks |
Messages In This Thread |
base_url() and css -img-js - by El Forum - 03-29-2010, 07:15 AM
base_url() and css -img-js - by El Forum - 03-29-2010, 07:20 AM
base_url() and css -img-js - by El Forum - 03-29-2010, 07:25 AM
base_url() and css -img-js - by El Forum - 03-29-2010, 07:26 AM
base_url() and css -img-js - by El Forum - 03-29-2010, 07:32 AM
base_url() and css -img-js - by El Forum - 03-29-2010, 07:38 AM
base_url() and css -img-js - by El Forum - 03-29-2010, 07:41 AM
base_url() and css -img-js - by El Forum - 04-11-2010, 06:38 AM
base_url() and css -img-js - by El Forum - 04-11-2010, 07:33 AM
base_url() and css -img-js - by El Forum - 04-11-2010, 07:40 AM
base_url() and css -img-js - by El Forum - 04-11-2010, 07:43 AM
base_url() and css -img-js - by El Forum - 04-11-2010, 07:47 AM
base_url() and css -img-js - by El Forum - 04-11-2010, 07:51 AM
base_url() and css -img-js - by El Forum - 04-11-2010, 07:55 AM
base_url() and css -img-js - by El Forum - 04-11-2010, 08:02 AM
base_url() and css -img-js - by El Forum - 04-11-2010, 08:06 AM
base_url() and css -img-js - by El Forum - 04-11-2010, 08:07 AM
base_url() and css -img-js - by El Forum - 04-11-2010, 08:11 AM
|