Welcome Guest, Not a member yet? Register   Sign In
Difficulty getting CI set up on my Server (accessing .css / .js files)
#1

[eluser]Unknown[/eluser]
Hi,

I used CI on a local MAMP server for a while, however I just purchased a website, and am having some trouble getting it set up to use .css and .js files. I try to get it with .com/css/***.css, but I keeping getting a 404 when I check the links in the header of the file. I'm not real sure what's going on.

Thanks
#2

[eluser]intractve[/eluser]
If you are using a .htaccess file to remove index.php from the url, you need to exclude folders from url rewrite

This is what i use to exclude "assets" folder, all my files are in folders under assets

Code:
RewriteEngine on
RewriteCond $1 !^(index\.php|favicon\.ico|robots\.txt|assets)
RewriteRule ^(.*)$ /index.php/$1 [L]

Also need to check...
While uploading files you might have missed the .htaccess, happened to me once because it doesnt usually show up in Finder
#3

[eluser]Unknown[/eluser]
Where should I put that? I have the .htaccess modified for the index.php removal, where does this fit into that. Thanks
#4

[eluser]intractve[/eluser]
The three lines i've mentioned above are all the code thats needed to remove the index.php from the url.

Or maybe I'm understanding you wrong, can you post your .htaccess 's contents here and I can tell you what needs to be changed




Theme © iAndrew 2016 - Forum software by © MyBB