Welcome Guest, Not a member yet? Register   Sign In
Where do you keep your CSS, Image, JS, Flash etc etc files?
#1

[eluser]nikefido[/eluser]
I'm just going to make a new folder within the Application folder where the MVC folders are, but I was wondering if there is some sort of "best practice" for this with code igniter?
#2

[eluser]dmiden[/eluser]
You can easily have them in your root directory ( above /system/ ) and then if you use the mod_rewrite you can modify it to exclude those dirs from the 'catch-all' regex.

RewriteEngine on
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]

Seperate each folder with a | if you want to exclude it.
#3

[eluser]adamp1[/eluser]
I put them in a public folder and use my asset linker library to link to them.
#4

[eluser]nikefido[/eluser]
I guess what I really need to know is from what file should I make my links relative to? I'd like to keep the links relative to make moving the app easier.

edit: thanks adam, i'll check it out!
#5

[eluser]nikefido[/eluser]
Adam, I sent you a PM, but I can pretty much figure it out - however, while you include an "image" folder for where to put assets, your code doesn't look like it handles placing images in (yet?)

I was wondering if I'm wrong about this - how would you recommend handling images? Hard coding the HTML?




Theme © iAndrew 2016 - Forum software by © MyBB