[eluser]selman555[/eluser]
Hi,
I'm having some issues loading my css file (located in base_url().application/css/homepage.css). I'm working on xampp.
My homepage.php is located in base_url().views/homepage.css
In homepage.php, I call the css like this:
Code:
<head>
...
<title>Welcome!</title>
...
<link rel="stylesheet" href='<?php echo base_url(); ?>css/homepage.css' type="text/css" media="screen, projection" />
</head>
I deleted the '#' from 'LoadModule rewrite_module modules/mod_rewrite.so' in httpd to enable rewrite_module.
I also altered the .htaccess in my codeigniter root so that it rewrites my url (which is working correctly)
Code:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /CodeIgniter/E-Cards/
#Removes access to the system folder by users.
#Additionally this will allow you to create a System.php controller,
#previously this would not have been possible.
#'system' can be replaced if you have renamed your system folder.
RewriteCond %{REQUEST_URI} ^system.*
RewriteRule ^(.*)$ /index.php?/$1 [L]
#When your application folder isn't in the system folder
#This snippet prevents user access to the application folder
#Submitted by: Fabdrol
#Rename 'application' to your applications folder name.
RewriteCond %{REQUEST_URI} ^application.*
RewriteRule ^(.*)$ /index.php?/$1 [L]
#Checks to see if the user is attempting to access a valid file,
#such as an image or css document, if this isn't true it sends the
#request to index.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]
#CSS rewrite condition
#RewriteCond $1 !^(index\.php|css|script|images|js|robots\.txt)
#RewriteRule ^(.*)$ /index.php/$1 [L]
php_flag short_open_tag off
php_flag magic_quotes_gpc Off
</IfModule>
<IfModule !mod_rewrite.c>
# If we don't have mod_rewrite installed, all 404's
# can be sent to index.php, and everything works as normal.
# Submitted by: ElliotHaughin
ErrorDocument 404 /index.php
</IfModule>
The commented part about CSS rewrite condition was copied from the codeigniter tutorials on css. But when I un-comment it, I'm always redirected to the xampp root.
when I load homepage.php through my browser and look at the source, the path seems to be correct, but when I open it,I get a totally different css page then the one I made.
If I open the same file in notepad, I get the correct css document.
What am I doing wrong?