Welcome Guest, Not a member yet? Register   Sign In
CSS is being generated?
#21

[eluser]pickupman[/eluser]
Seems you may have gotten it. It is working for me.
#22

[eluser]spletta[/eluser]
Ok so I followed your instructions about relocating the application folder... and I followed the link you provided.

I created a new folder named /public absolute path = /home/signaleast/codeigniter/public

My directory looks like this now:
Code:
- home/
  -signaleast/
      -codeigniter/
          - application/        // Your application
          - system/                // The Codeigniter Stuff
          - public/            // This folder is what a visitor to your site would see. You will need to configure your host to change the folder
                -index.php         // Your edited index.php file
                - css/            // All your css stuff goes in here
                - js/            // All your javascript stuff goes in here

And apache points to /home/signaleast/codeigniter/public/ as well...

I changed the index.php as instructed in the the link
Code:
| NO TRAILING SLASH!
|
*/
    $application_folder = "/home/signaleast/codeigniter/application";

/*

And I get a 404 not found.. do I need to change some more in the index.php?
#23

[eluser]sqwk[/eluser]
You will also need to update the system folder:

Code:
$system_folder = "/home/signaleast/codeigniter/system";
#24

[eluser]spletta[/eluser]
Nice its all working.. now it's time to play with jQTouch.. that will be fun!

Thanks to both of you guys for the assistance.
#25

[eluser]spletta[/eluser]
Weird stuff again.. I came back to this today and now for some reason CI is adding in the controller into the css path.

Request URL:http://home.signaleast.com/contact/css/style.css

I have not changed one thing.. and I must add that It worked at first! But when I used the back button inside the app this behavior popped up.. thats the only thing I did.

Here is my .htaccess
Code:
RewriteEngine on
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php/$1 [L]

The rest of the app is set up as previously mentioned
with this link to the css
Code:
<link rel="stylesheet" href="css/style.css" type="text/css" media="screen" charset="utf-8">
#26

[eluser]spletta[/eluser]
Ahh wait I just noticed something

the difference between

http://home.signaleast.com/login (Does Work)

and

http://home.signaleast.com/login/ (Doesn't Work)

wow.. ok.. so I have to make sure my when redirecting to keep that trailing "/" off.. how do I do that?
#27

[eluser]sqwk[/eluser]
Put a / in front to make the URL absolute (based on the site root)

Code:
<link rel="stylesheet" href="/css/style.css" type="text/css" media="screen" charset="utf-8">

Also take some time and learn about absolute and relative URLs: http://www.webdevelopersnotes.com/design..._urls.php3
#28

[eluser]spletta[/eluser]
Yeah exactly.. for example when I try to create a new user from the login screen.. it of course uses my login controller function signup which points to the signup_form view.. the generated css link is then /login/css/style.css not /css/style.css.. and I get a 404 error.

I'm checking the documentation for an answer.
#29

[eluser]spletta[/eluser]
thanks for the link
#30

[eluser]sqwk[/eluser]
The css is a static file in your public folder. Codeigniter has nothing to do with it. To make the link work from all URLs you just need to make it absolute. Otherwise, the browser (not Codeigniter) simply appends it to the current URL. In the case of /login/ that would be /login/css/etc, in the case of /login it would be /css/etc as login (without the trailing slash) is viewed as a file rather than a directory. Just put the extra / in the css link and it will work.




Theme © iAndrew 2016 - Forum software by © MyBB