1

I am currently having problems with uploading images and using clean urls on my website. File permissions are working correctly.

When I upload an image to an article page and then I click refresh to view the page, the image doesn't appear. I check for the image url and an example url would be:

http://example.com/sites/default/files/styles/large/public/field/image/01.jpg

but the image would appear if I modify the url on the address bar to:

http://example.com/?q=sites/default/files/styles/large/public/field/image/01.jpg

I have tried:

turning on and off clean urls (sometimes the images appear, but then they disappear again) modifying rewrite rules in the the .htaccess file folder permissions This happened when I uploaded the site to a server and the url would change, but before uploading the site to the servers and testing it on my computer, the url doesn't change. I am currently thinking that it has something to do with some of the rewrite rules in the .htaccess file.

4
  • Does it work with vanilla Drupal .htaccess?
    – Mołot
    Commented May 15, 2013 at 6:42
  • Slang term, sorry. It means unmodified, just the way it is when you download fresh copy.
    – Mołot
    Commented May 15, 2013 at 14:27
  • Yes, I did a clean install (7.22) on my laptop and then I used backup and migrate to load/create the mysql database to the server and the installation
    – Poe
    Commented May 15, 2013 at 14:37
  • Actually, I had to remove some settings because my server doesn't allow it, I had to remove both options directives and the entire mod_php5.c block.
    – Poe
    Commented May 16, 2013 at 4:09

3 Answers 3

1

Even if Clean URLs are successfully enabled at install-time, if you have a dedicated server you may still want to follow the steps (below) to enable the more efficient httpd.conf rewrite method for clean URLs. If you choose to do that, you might want to turn off Clean URLs while you are working on the server. Server configuration for Clean URLs on a dedicated server, with httpd.conf

1

Uncommenting the RewriteBase at line 110 in .htaccess file of root solved the problem for me. Depending on your installation folder, you might uncomment and modify line 106 instead of 110. I found that solution, in a drupal.org article and in case that doesn't solve your problem there are alternative solutions there as well.

0

I went on another direction with my photos but I figured it out anyway. All I had to do was to delete the .htaccess file in the site/default/files.

1
  • Great! You figured it out yourself. Commented Jul 28, 2014 at 6:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.