1

Tried adding images to a header block, it worked the first time but the images had different widths. So I opened them up in photoshop edited the widths, uploaded them back to file server with same filename and extension. Refreshed the web page and the images are not showing?

As shown Here

The images are definetly there and viewable as you can see here (www.pctek.com.au/skin/frontend/rwd/default/images/paypal.png) for example. The cache has been turned off but I have tried refreshing and tried CTRL+F5 my own browser with no avail.

Anything I'm missing?

Thanks

  • Veiwing it in Google Chromes inspect, it seems to be adding /index.php/ into the link. My base url for everything is www.pctek.com.au and www.pctek.com.au/*** – SixShields Jan 28 '16 at 1:50
  • It looks like the images are working on www.pctek.com.au – rob3000 Jan 28 '16 at 1:59
  • Wow! Now they are working, but if you navigate to another page, they stop working and redirect to /index.php/ link again. – SixShields Jan 28 '16 at 2:46
  • hmm does the base url include the / at the end of the urls? How are the images being added? – rob3000 Jan 28 '16 at 3:03
  • Yes I've added "/" to all base URL's secure and non-secure. – SixShields Jan 28 '16 at 4:48
2

Check the following:

  1. Make sure mod_rewrite or equivalent is enabled in your web server.
  2. Check that .htaccess exists in your root folder (only if your web server is Apache)
  3. Check Search Engines Optimization System Setting

There's a system setting from which you can turn on and off web server rewrites. To access this option, in the admin panel of your Magento go to System menu-> Configuration, on the page that opens click on the Web button under the General menu on the left, and from the panels that appear on the right select Search Engines Optimization to expand it. The panel contains the option Use Web Server Rewrites and it's set to No by default

| improve this answer | |
  • I'm on a shared hosting plan, how am I supposed to find out if mod_rewrite is enabled? Is it a php setting I can configure? I don't have root/ssh access so cannot check everything. I tried enabling server rewrites in the back end and it 404'd my website so had to turn it off :-/ – SixShields Jan 28 '16 at 2:48
  • mod_rewrite is an Apache server directive usually configured as documented in the official Apache documentation: httpd.apache.org/docs/2.2/mod/mod_rewrite.html. – Bryan 'BJ' Hoffpauir Jr. Jan 28 '16 at 3:46
1

Per the Apache server official documentation, because the configuration settings of the primary apache httpd.conf file are not inherited by virtual sites hosted on a shared apache installation by default, this must be configured in the <VirtualHosts> directive for each site hosted in the shared environment:

By default, mod_rewrite configuration settings from the main server context are not inherited by virtual hosts. To make the main server settings apply to virtual hosts, you must place the following directives in each <VirtualHost> section:

RewriteEngine On
RewriteOptions Inherit

Given that you're on a shared hosting plan, there is a chance that your hosting provider may not be using the default configuration and may allow configuration of this directive in another configuration file besides the default. You should contact their support team for verification and provide them this information so the can determine the fastest way to restore the functionality you have identified as broken.

This is not the only apache configuration directive that uses a different inheritance mechanism when <VirtualHosts> are employed, so I would be surprised if your provider did not have a well-known mechanism of configuring this in there environment.

| improve this answer | |
  • Thanks man! Will write to them now and link them to this page. – SixShields Jan 28 '16 at 4:45
  • My pleasure! This is a fairly common issue you'll run into on shared hosting environments and isn't unique to Magento, though the symptom of having everything work EXCEPT images tends to happen more on Magento 1.X installs, so it's good to learn how the Apache, PHP, and Magento systems interact as early as you can. Please post your findings after speaking with your hosting provider and accept an answer or post an update so we can continue troubleshooting with you if needed. – Bryan 'BJ' Hoffpauir Jr. Jan 28 '16 at 6:24
  • I emailed them yesterday, just checked my emails and still no reply :/ Very bad support on there end. I'm looking into VPS Services though as I feel I may need it in the future.] – SixShields Jan 29 '16 at 3:23
  • Do you specifically what version you're running? While helping someone else work through a similar issue today, we discovered a few things. First, the broken stuff was on the latest 1.9.2.3, there were .htaccess files in the media location that were different than he remebered before another developer had worked on the site, he DIDN'T have access to his virtual host file on the shared host but he and the other developer could have used the web interface to make changes. The short version is that all of these things work together & if 1 is wrong, it can affect other parts. – Bryan 'BJ' Hoffpauir Jr. Jan 29 '16 at 3:28
  • Well I am another developer working on this web site >.< The old developer was some old french guy and everything he wrote is in french! Very hard for me! I'll have a look now on ftp if there are any other .htaccess files lying about. – SixShields Jan 29 '16 at 3:36
0

Go into magento/media folder where you can find .htaccess file rename it .htaccess_bck clean the cache and see if it iss working or not.

| improve this answer | |

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.