Welcome Guest, Not a member yet? Register   Sign In
base_url() and css -img-js
#8

[eluser]Sergiu D[/eluser]
Hello there,

My name is Sergiu, and I'm not new to CodeIgniter, but I'm new to all this rewrite crap. So, my problem is pretty similar to my fellow above me. Now, I think I've read almost all topics on this forum regarding .htaccess modifications, and right now I'm pissed off. :-)

I am trying to figure out a solution to this. My problem is that, I don't want to put extra code in my projects. I don't want to use something like this:

Code:
<link href="<?=site_url('assets/stylesheets')?>/style.css" rel="stylesheet" type="text/css" media="screen" />

I want to use something nice and cleaner, like:

Code:
<link href="css/style.css" rel="stylesheet" type="text/css" media="screen">
<img src="images/foobar.jpg" alt="">


Now, back in the old days, when we didn't had to worry about SEO and stupid friendly links, we could have accomplish that task with no sweat. But now, well... now is another story. The biggest problem is that I have some links to images, like the one above, in my database, that I just can't change (and don't want, to be truly honest).

Is there no way, and I mean, NO WAY, to make things work?
Let's say I have this directory structure:

Code:
/
/css
/js
/imags
/system
.htaccess
index.php

I am using this in my .htaccess:

Code:
RewriteEngine on
RewriteCond $1 !^(index\.php|images|css|js|template|scripts|robots\.txt)
RewriteRule ^(.*)$ index.php/$1 [L]

What condition can I add in .htaccess to make this work in my page?

Code:
&lt;link href="css/style.css" rel="stylesheet" type="text/css" media="screen"&gt;
<img src="images/foobar.jpg" alt="">


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



Theme © iAndrew 2016 - Forum software by © MyBB