Welcome Guest, Not a member yet? Register   Sign In
css, js and images path problem
#1

[eluser]veledrom[/eluser]
Hi,

My directory structure is this:

+ index.php
+ license.txt
+ application
+ system
+ user_guide
- web
- css
- images
- js

When I run my website on my local computer with WAMP, all fine but when I run it on my web hosting space (LINUX) no css, js and images are picked up.

I manually type the full URL to these 3 folders and the files inside, I get "500 Internal Server Error".

Why do you think this is happening?

Thanks
#2

[eluser]mak.gnu[/eluser]
Create three constants all three and give like this

Code:
define('CSS',base_url().'web/css/');
define('JS',base_url().'web/js/');
define('IMAGES',base_url().'web/images/');

and then use them in view.
#3

[eluser]veledrom[/eluser]
Content of .htaccess solved the problem.

RewriteEngine on
RewriteCond $1 !^(index\.php|web|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]




Theme © iAndrew 2016 - Forum software by © MyBB