Welcome Guest, Not a member yet? Register   Sign In
CSS external files.
#17

[eluser]EyeAmN8[/eluser]
I am also new to CI and have been having trouble with the whole re-write part of it. Everything got messed up after I used the tutorials .htaccess snippet.

I found some better info on the web and combined it with the above mentioned code and now my css files are being rendered properly. Thanks for all of the posts!
Code:
<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /

    #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.*
    #
    # edited the below line to accept the needed contents of the assets folder
    RewriteCond $1 !^(index\.php|assets|images|css|js|robots\.txt|favicon\.ico)
    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]
</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>


Messages In This Thread
CSS external files. - by El Forum - 05-18-2012, 03:09 PM
CSS external files. - by El Forum - 05-18-2012, 09:30 PM
CSS external files. - by El Forum - 05-18-2012, 11:26 PM
CSS external files. - by El Forum - 05-19-2012, 12:07 AM
CSS external files. - by El Forum - 05-19-2012, 03:00 AM
CSS external files. - by El Forum - 05-19-2012, 04:52 AM
CSS external files. - by El Forum - 05-19-2012, 07:21 AM
CSS external files. - by El Forum - 05-19-2012, 07:25 AM
CSS external files. - by El Forum - 05-19-2012, 08:14 AM
CSS external files. - by El Forum - 05-19-2012, 08:33 AM
CSS external files. - by El Forum - 05-19-2012, 09:14 AM
CSS external files. - by El Forum - 05-19-2012, 09:29 AM
CSS external files. - by El Forum - 05-19-2012, 10:24 AM
CSS external files. - by El Forum - 05-19-2012, 11:31 AM
CSS external files. - by El Forum - 05-19-2012, 11:35 AM
CSS external files. - by El Forum - 05-19-2012, 12:45 PM
CSS external files. - by El Forum - 02-05-2013, 01:52 PM
CSS external files. - by El Forum - 02-05-2013, 02:12 PM
CSS external files. - by El Forum - 02-06-2013, 10:38 AM



Theme © iAndrew 2016 - Forum software by © MyBB