Welcome Guest, Not a member yet? Register   Sign In
beginners problem
#1

[eluser]Razedd[/eluser]
Hello,

I have a beginners problem, saw a view topics about it but when i tried to fix it it failed and now im confused.
basicly this is what i want:
http://localhost/project/ or http://localhost/project/index.php needs to be my startpage, not both.
now i have this problem with linking images, i see them in http://localhost/project/ but not in http://localhost/project/index.php .. so where is the best place to put youre images and how do you link to them then.
(when i tried something with the .htaccess file from other posts i got a error 500 or something)

I hope someone can help me clear it up and sorry if the post is a bit confusing to ^^

greets,
Razedd
#2

[eluser]Bart v B[/eluser]
What i alway's do, is just make a map called images and then i use the base_url() option.
So it would become something like this:

Code:
<img src="&lt;?php echo base_url();?&gt;images/someimg.jpg" />

when you use it on a other project or other server it's alway's correct.
You just have to load the helper url, and in your config.php give the base_url the correct site adress..
#3

[eluser]Razedd[/eluser]
ahh nice thanks for that, that will fix the image problem,
annything on getting rid of the /index.php ??

EDIT: for instance it is http://codeigniter.com/downloads and not http://codeigniter.com/index.php/downloads
#4

[eluser]Mixon851[/eluser]
You have to edit the .htaccess to get rid of the /index.php

http://opinionatedcoder.wordpress.com/20...-htaccess/ is a tutorial on how to do so.




Theme © iAndrew 2016 - Forum software by © MyBB