Skip to content

.htaccess not working on localhost #92

Closed
queenohearts opened this Issue Dec 21, 2012 · 2 comments

2 participants

@queenohearts

Apologies if this is beyond the scope of your support but I must ask:

I have a site on my local server where I'm testing adaptive images, but so far have had no luck getting it to work. I've checked two other threads here looking for clues:

1) #32
2) #52

As Matt suggested, I created a test.jpg and included it on .htaccess to see if it would change the images. Nope, it didn't change anything. My server is running Apache and has PHP, so I thought 'maybe, my PHP is not configured correctly'. I created a test php file and included it in the directory of my site, and it worked fine. So that eliminates PHP being a problem. It seems there's something wrong with my .htaccess, but what? Everything is as coded by Max.

Any ideas or help would be greatly appreciated.

Thanks.

@queenohearts

Nevermind! My bad. All i had to do was restart apache. All my images were replaced with the test image. So htaccess appears to be parsed.

However, now i'm getting the black image with the error: 'Failed to create cache directory: Library/WebServer/Documents/ai-cache'

@MattWilcox
Owner

Glad you got that bit debugged :) If you're getting a failed to create directory error the most likely problem is incorrect permissions.

Manually create the ai-cache directory and then make sure the permissions are set for the ai script to be able to write into it: If the server is set up correctly a CHMOD 755 would be ok, but you may need to use Chomd 777 on the ai-cache directory.

@MattWilcox MattWilcox closed this Jul 21, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.