file paths are wrong |
[eluser]GamingFusion[/eluser]
ok heres what i got Code: <IfModule mod_rewrite.c> and heres my link to an image Code: <a href="#"><img src="<?php echo base_url();?>assets/images/logo.png" alt="logo" border="0"/></a> and the image doesnt load, when i copy the image location and open it in another tab and i get a 404 page but not the CI 404
[eluser]WanWizard[/eluser]
If you get a standard 404 page, that means that a) your rewrite condition works b) the file does not exist or can not be loaded When you get the properties of the image in your browser, what is the src pointing to? Do you have your site's base url defined in the config file? If the path to the image is correct, does the image exist (and if on Linux, is the case correct?) Does the webserver has the right to read the image?
[eluser]GamingFusion[/eluser]
the file exist because i go to the file location in the browser(file:///Users/Username/Sites/socialcrab/system/appication/views/socialcrab/assets/images/logo.png) and it comes up but i even tried putting that as the file location in the code and it wont load.
[eluser]Slowcheetah[/eluser]
Did you check the permission rights of the file?
[eluser]Slowcheetah[/eluser]
[quote author="GamingFusion" date="1276631593"]im currently running it on a local server[/quote] Local server also have permissions.. Do you work on windows? or apple? or *nix?
[eluser]Slowcheetah[/eluser]
http://brockwoolf.com/blog/change-file-p...n-mac-os-x
[eluser]danmontgomery[/eluser]
[quote author="GamingFusion" date="1276630116"]the file exist because i go to the file location in the browser(file:///Users/Username/Sites/socialcrab/system/appication/views/socialcrab/assets/images/logo.png) and it comes up but i even tried putting that as the file location in the code and it wont load.[/quote] base_url() is the location of index.php, in this case I'm guessing /users/username/sites/socialcrab. /users/username/sites/socialcrab/assets/images/logo.png is not the path you have pasted above... So no, it doesn't exist. My suggestion is to move assets to the same location as index.php, so your assets will always be in the same place relative to the url. I'm also partial to the traditional "only rewrite if the path doesn't exist" htaccess: Code: # Turn on URL rewriting
|
Welcome Guest, Not a member yet? Register Sign In |