jreimer Posted August 28, 2010 Share Posted August 28, 2010 Hi folks,I have installed Prestashop so it is working quite nicely on a subdomain of my site. My plan was then to copy it over to the root of my site, using the same databases, etc, to push it live and superceed my old E-commerce software.This generally worked, everything seemed to function properly - except all except about a dozen images (out of 300+ products) disappeared. The images are all still in the img/p folder, and should be displaying - I can't think of any reason on earth why they aren't displaying?? I chmoded correctly, regenerated .htaccess files, I tried everything... couldn't get them to display?Any ideas would be most appreciated.Thanks,Joshua Link to comment Share on other sites More sharing options...
crazydeals Posted August 28, 2010 Share Posted August 28, 2010 jreimer,What does error_log say in your root directory?Alternatively, you may want to alter your .htaccess without moving the presta folder from the sub-domain to the root. # Copy and paste the following code into the .htaccess file # in the public_html folder of your hosting account # make the changes to the file according to the instructions. # Do not change this line - RewriteEngine on RewriteEngine on # Change yourdomain.com to be your main domain. RewriteCond %{HTTP_HOST} ^(www.)?mysite.com$ # Change 'subfolder' to be the folder you will use for your main domain. RewriteCond %{REQUEST_URI} !^/prestashop/ # Don't change this line. RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d # Change 'subfolder' to be the folder you will use for your main domain. RewriteRule ^(.*)$ /prestashop/$1 # Change yourdomain.com to be your main domain again. # Change 'subfolder' to be the folder you will use for your main domain # followed by / then the main file for your site, index.php, index.html, etc. RewriteCond %{HTTP_HOST} ^(www.)?mysite.com$ RewriteRule ^(/)?$ prestashop/index.php [L] Link to comment Share on other sites More sharing options...
jreimer Posted August 31, 2010 Author Share Posted August 31, 2010 Hi, thanks for the quick reply!!There is nothing new in the error log file.I tried changing the .htaccess file to the one you recommended, but it didn't like it at all. The half dozen images which were displaying now no longer display at all, and the links to all the products are broken.This is my current, automatically generated one - do you see any reason why it might not be working properly? # .htaccess automaticaly generated by PrestaShop e-commerce open-source solution # http://www.prestashop.com - http://www.prestashop.com/forums # URL rewriting module activation RewriteEngine on # URL rewriting rules RewriteRule ^([a-z0-9]+)\-([a-z0-9]+)(\-[_a-zA-Z0-9-]*)/([_a-zA-Z0-9-]*)\.jpg$ /img/p/$1-$2$3.jpg [L,E] RewriteRule ^([0-9]+)\-([0-9]+)/([_a-zA-Z0-9-]*)\.jpg$ /img/p/$1-$2.jpg [L,E] RewriteRule ^([0-9]+)(\-[_a-zA-Z0-9-]*)/([_a-zA-Z0-9-]*)\.jpg$ /img/c/$1$2.jpg [L,E] RewriteRule ^lang-([a-z]{2})/([a-zA-Z0-9-]*)/([0-9]+)\-([a-zA-Z0-9-]*)\.html(.*)$ /product.php?id_product=$3&isolang;=$1$5 [L,E] RewriteRule ^lang-([a-z]{2})/([0-9]+)\-([a-zA-Z0-9-]*)\.html(.*)$ /product.php?id_product=$2&isolang;=$1$4 [L,E] RewriteRule ^lang-([a-z]{2})/([0-9]+)\-([a-zA-Z0-9-]*)(.*)$ /category.php?id_category=$2&isolang;=$1 [QSA,L,E] RewriteRule ^([a-zA-Z0-9-]*)/([0-9]+)\-([a-zA-Z0-9-]*)\.html(.*)$ /product.php?id_product=$2$4 [L,E] RewriteRule ^([0-9]+)\-([a-zA-Z0-9-]*)\.html(.*)$ /product.php?id_product=$1$3 [L,E] RewriteRule ^([0-9]+)\-([a-zA-Z0-9-]*)(.*)$ /category.php?id_category=$1 [QSA,L,E] RewriteRule ^content/([0-9]+)\-([a-zA-Z0-9-]*)(.*)$ /cms.php?id_cms=$1 [QSA,L,E] RewriteRule ^([0-9]+)__([a-zA-Z0-9-]*)(.*)$ /supplier.php?id_supplier=$1$3 [QSA,L,E] RewriteRule ^([0-9]+)_([a-zA-Z0-9-]*)(.*)$ /manufacturer.php?id_manufacturer=$1$3 [QSA,L,E] RewriteRule ^lang-([a-z]{2})/(.*)$ /$2?isolang=$1 [QSA,L,E] # Catch 404 errors ErrorDocument 404 /404.php The testing site is at testing.hisgifts.com.au, and I am trying to load up the new site at hisgifts.com.au (I've rolled it back to my old e-commerce program at the moment so I can continue to service my current customers!!).If anyone has any ideas on this it would be great, I am tearing my hair out here!!Thanks,Joshua Link to comment Share on other sites More sharing options...
jreimer Posted September 1, 2010 Author Share Posted September 1, 2010 Any ideas anyone? Why would my images not be all displaying when I transfer my site from a subdomain to the root, using the exact same database? I can't think of any reason, unless there is a setting somewhere I need to change which I've missed?? Link to comment Share on other sites More sharing options...
jreimer Posted September 3, 2010 Author Share Posted September 3, 2010 Okay... I went and re-read your post and figured out what you were getting at - it worked to leave it in the subdomain directory and just re-write it all, it's perfect!! Thanks so much for your help.Cheers,Joshua Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now