0

Why is my link for bootstrap.css link return a wrong one? The link for bootstrap becomes this:

http://localhost/ciproj/localhost/ciproj/assets/css/bootstrap.css

but I am using a code like this

<link rel="stylesheet" text="text/css" href="<?php base_url(); ?>assests/css/bootstrap.css />

My config.php is set to:

$config['base_url'] = 'localhost/ciproj';
$config['index_page'] = '';
$config['uri_protocol'] = 'AUTO';

My .htaccess is

<IfModule mod_rewrite.cs>
      RewriteEngine On
      RewriteCond $1 !^(index\.php|images|Scripts|css|robots\.txt)
      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteCond %{REQUEST_FILENAME} !-d
      RewriteRule ^(.*)$ index.php/$1 [L]
 </IfModule>

and my directory structure is like this

-ciproj
   -application
     -system
     -index.php
     -assets
            -css
                -bootstrap.css
            -js
     -.htaccess
Mike Causer
  • 8,196
  • 2
  • 43
  • 63
KiX Ortillan
  • 210
  • 2
  • 13
  • have you tried leaving your `base_url` blank. – tomexsans Dec 17 '13 at 02:13
  • @falinsky sorry its not applicable to me. already tried. I know that it has something to do with my .htaccess but I cannot see the problem. As you can see the base_url becomes doubled meaning my rewriterule is not working because i assume i am adding an exeption for css – KiX Ortillan Dec 17 '13 at 02:13
  • im new to SO can you specify how i can clean that .htaccess code :) – KiX Ortillan Dec 17 '13 at 02:14

1 Answers1

1

try to change from

$config['base_url'] = 'localhost/ciproj';

to

$config['base_url'] = 'http://localhost/ciproj';

update:

try

<IfModule mod_rewrite.cs> 
    RewriteEngine On 
    RewriteCond $1 !^(index\.php|images|assets|Scripts|css|robots\.txt) 
    RewriteCond %{REQUEST_FILENAME} !-f 
    RewriteCond %{REQUEST_FILENAME} !-d 
    RewriteRule ^(.*)$ index.php/$1 [L] 
</IfModule>
falinsky
  • 7,229
  • 3
  • 32
  • 56