Welcome Guest, Not a member yet? Register   Sign In
htaccess and image paths
#1

[eluser]Unknown[/eluser]
Hello all

I'm very new to codeigniter and I'm sure this has been answered many times but I cannot seem to find the answer.
I have my CI organised as follows
system
licence.txt
htdocs
index.php
.htaccess
assets
images
image1.gif
application
....

In the .htaccess file I have
RewriteEngine on
RewriteCond $1 !^(index\.php)
RewriteRule ^(.*)$ /index.php/$1 [L]

I have a controller called hello, which simply loads a view with $this->load->view('mainview.php');
The view file has the following
<img src="&lt;?php echo base_url(); ?&gt;assets/images/image1.gif" /> Test

When I view this in a browser, via http://mytestsite.co.uk/hello I cannot see the image. If I remove the RewriteRule in .htaccess and go to http://mytestsite.co.uk/index.php/hello I can see the image.
Can somebody please advise if
a) The directory structure I have above is correct.
b) How to remove/hide index.php from url, but have the image included.

Thanks in advance
Andrew


Messages In This Thread
htaccess and image paths - by El Forum - 08-25-2009, 08:52 AM
htaccess and image paths - by El Forum - 08-25-2009, 09:47 AM



Theme © iAndrew 2016 - Forum software by © MyBB