.htaccess stops css from loading |
[eluser]jblack199[/eluser]
Okay so I've been working on this admin script im working on (just starting it really) and i've set my site up to remove the index.php from the url however i think because of that it's causing my css to now load... When I visit my site http://name.domain.com/adm it automatically checks if I am logged in and if my account is still a valid user in the database. If i'm not logged in, or i'm not a valid user is redirects me to http://name.domain.com/adm/login adm is a folder inside my controllers and my view folders. In the adm folder thats in the view, I have another subfolder called templates which holds template.php, header.php and footer.php my header.php: Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> This is working just as it should as in it links to the correct location: http://name.domain.com/css/adm/style.css Problem is, it doesnt actually load the stylesheet and I think it has something to do with my .htaccess Code: RewriteEngine on Any help on figuring that out would be awesome.. thanks -- if you need any other files of code let me know and i'll post that up as well...
[eluser]jblack199[/eluser]
Alright so after i posted this, I figured it out... The problem was the .htaccess folder, but more importantly the needing to add the ability to use the css folder... so now my htaccess looks like: Code: RewriteEngine on There seemed to still be an issue with the way it was loading from the link, so i removed the media and charset and it seems to work fine now... I think in the near future I'll probably create an assets or inc folder and put my images, css, js in there so that I should only have to note the assets or inc folder in the css instead of having images|css|js and whatever else I need...
[eluser]Aken[/eluser]
Try this .htaccess instead, see if you have better luck.
[eluser]praveens[/eluser]
Try this Code: RewriteCond %{REQUEST_FILENAME} !-f
[eluser]jblack199[/eluser]
I ended up using the .htaccess i posted above and it's working beautifully... being that this is going to be a full blown redistributable CMS just so I can say I did it, having everything routed through CI will be beneficial if i decide to distribute it to the masses as an alternative to joomla, wordpress or other bloated CMS's which options that most end-users wont use, cant use, or if they do use have the issue of breaking the entire site due to lack of knowledge of the function(s). |
Welcome Guest, Not a member yet? Register Sign In |