Welcome Guest, Not a member yet? Register   Sign In
why can't I see my images and css files?
#1

[eluser]obiron2[/eluser]
Hi guys,
I have the following folder setup
Code:
c:/xampp->/htdocs
          ->/assets
            ->/images
            ->/css
          ->/codeigniter
            ->/application
              ->/all the usual view,controller,model etc..
              ->.htaccess
            ->/system
        ->php
        ->cgi_bin
        ->etc...

when I run the front page from //localhost/codeigniter or //localhost/codeigniter/index.phpI can see the site properly formatted with images and css. when I run it from //localhost/codeigniter/index.php/welcome I only get the text and the links to the stuff in assets is not being picked up.

I currently have the links hard coded as
Code:
<link rel="stylesheet" type="text/css" href="../assets/css/style.css" />
as I have not set a base url yet.

the htaccess file contains the following
Code:
RewriteEngine on
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]

What should I set as base url for running on local host and website and do I need to modify the routes file in the config folder.
#2

[eluser]CroNiX[/eluser]
you aren't allowing access to your assets dir in your htaccess...
#3

[eluser]InsiteFX[/eluser]
Code:
RewriteCond $1 !^(index\.php|assets|css|js|images|img|robots\.txt|favicon\.ico)




Theme © iAndrew 2016 - Forum software by © MyBB