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

2
  • 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? Commented Sep 7, 2014 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
    Commented Sep 9, 2014 at 11:01

1 Answer 1

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

7
  • 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
    Commented Sep 9, 2014 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. Commented Sep 9, 2014 at 12:10
  • Okay, so can you please tell me how can I turn on High Logging ?
    – Amrinder
    Commented Sep 10, 2014 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 Commented Sep 11, 2014 at 16:13
  • That sub domain required htaccess file. Now issue has been resolved. Thanks Fabian.
    – Amrinder
    Commented Sep 14, 2014 at 8:27

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.