1

My page is unable to load the CSS when I am trying to load the page with default controller like this: //localhost/mysite/

But when I am trying to load the page like this //localhost/mysite/index.php/site/index css the CSS is loaded perfectly, and I have to create both my css and image folders like this:

Path C:\wamp\www\tt\assets\css and all other application paths are in the root path of the tt like c:\wamp\www\tt\application.

Please give me solution as soon as possible.

2
  • What does your .htaccessfile look like? Commented Jan 24, 2013 at 10:44
  • What do you mean by path of the tt here? Commented Jan 24, 2013 at 11:00

2 Answers 2

1

you should give read/write permissions to assets folder and you should user this script to link the css

<link rel="stylesheet" href="<?php echo base_url('assets/css/style.css');?>">
Sign up to request clarification or add additional context in comments.

Comments

1

Create a .htaccess file in your tt folder. And place this to remove index.php from your url:

RewriteEngine on
RewriteCond $1 !^(index\.php|resources|robots\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L,QSA] 

And you should be able to access your file directly <?php echo base_url()."tt/assets/css/cssfilename.css" ?>

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.