Images and Css files not linking properly

Hello

I have been creating a website on my dev environment, using MAMP and cakephp inside my htdocs folder. i have been linking my images and css files using the HTML helper (nothing outside the ordinary). Today i just moved all the folders from my dev environment to my webhost (exactly as is). The website appears but none of the images or the css files are showing up.

the location of my image files are in:

APP/webroot/img/

I suppose the url to access these will be:

http://<domain name>/img/header.png (for example)

but it returns nothing, the css files which are linked/imported using the html helper also are not to recognised, no images or css is working in my view can anyone help?

Asked by pastryking, on 18/5/10

1 Answer

Check you have included the .htaccess files. Mac hides them by default

they should be:

/.htaccess

/app/.htaccess

/app/webroot/.htaccess

Hopefully that will fix it.

Answered by aSecondWillon 19/5/10

Similar problem on OSX with MAMP even though I had copied all .htaccess files over.

In my httpd.conf file I had to add the directory piece below, now works fine

DocumentRoot "/Users/path/to/website"

ServerName servername

Options Indexes FollowSymLinks

AllowOverride All

jeahface - on 29/7/10

<< comments | comments >>
<< previous next >>

Tagged with

Rating

0

Viewed

229 times

Last Activity

on 29/7/10