1

I am facing one problem in my magento website.

I have a email newsletter which have some images to show.

My problem is to access the images outside the website. For example, when i typed the url/path of images paced in website, it shows 404 error, because magento think this is a some page name(which is not actually).

I just want to access those images. For example example.com/newsletter_images/offer.jpg

Guys, please help. I am stucked in this.

Thanks in advance

-Amrinder

  • If you put an image in a folder outside of the Magento install you should be able to access that image you described since you are not even loading Magento. Are you sure you don't have an htaccess file in your folder or a rule that will not allow you to browse that folder? – brentwpeterson Sep 7 '14 at 17:46
  • Hello Brentwpeterson, Thankyou for replying me. My folder/image location is already outside the Magento direcptory. My folder is at public_html/newsletter_images All other folders like app, downloader, errors, includes, js, lib, shell, skin etc are also in "public_html" I am still not able to access the image at location public_html/newsletter_images/offer.jpg with direct type of name like example.com/newsletter_images/offer.jpg Thankyou in advance -Amrinder – Amrinder Sep 9 '14 at 11:01
1

Magento makes sure, that it only rewrites files that don't exist and if they are outside media skin and js:

.htaccess
## always send 404 on missing files in these folders

    RewriteCond %{REQUEST_URI} !^/(media|skin|js)/

############################################
## never rewrite for existing files, directories and links

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-l

So what you describe shouldn't happen.

Did you put the file inside your root directory inside /newsletter_images/ and name it offer.jpg

  • Hello Fabian Blechschmidt, Thankyou for replying me. My folder/image location is already outside the Magento direcptory. My folder is at public_html/newsletter_images All other folders like app, downloader, errors, includes, js, lib, shell, skin etc are also in "public_html" I am still not able to access the image at location public_html/newsletter_images/offer.jpg with direct type of name like example.com/newsletter_images/offer.jpg Thankyou in advance -Amrinder – Amrinder Sep 9 '14 at 11:02
  • Then something is "wrong" with your htaccess or apache configuration. turn on high logging for apache, so you can see what rewrites are done. – Fabian Blechschmidt Sep 9 '14 at 12:10
  • Okay, so can you please tell me how can I turn on High Logging ? – Amrinder Sep 10 '14 at 17:36
  • I would try this: httpd.apache.org/docs/current/mod/mod_rewrite.html#logging And check the access_log whether you request the right file – Fabian Blechschmidt Sep 11 '14 at 16:13
  • That sub domain required htaccess file. Now issue has been resolved. Thanks Fabian. – Amrinder Sep 14 '14 at 8:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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