Scotty501 Posted November 24, 2010 Share Posted November 24, 2010 Hi All,I created a blank .htaccess and uploaded it to a site http://www.perfectpaysupply.com/ and generated a htaccess file using the generator after turning on friendly in preferences.This caused a problem where the images were not changing and although the pages were changing when clicking links - so i thought I would turn off friendly url's until i solved the problem - but now I am getting errors when I click any products 404 errors to be precise - please advise urgently. Link to comment Share on other sites More sharing options...
shop365 Posted November 24, 2010 Share Posted November 24, 2010 Hi All,I created a blank .htaccess and uploaded it to a site http://www.perfectpaysupply.com/ and generated a htaccess file using the generator after turning on friendly in preferences.This caused a problem where the images were not changing and although the pages were changing when clicking links - so i thought I would turn off friendly url's until i solved the problem - but now I am getting errors when I click any products 404 errors to be precise - please advise urgently. HelloPlease regenerate the immage Link to comment Share on other sites More sharing options...
Scotty501 Posted November 24, 2010 Author Share Posted November 24, 2010 OK I am trying that now. I have put friendly url back on with a newly generated htaccess file and it really has gone screwy with the layout and images - http://perfectpaysupply.com/ Im waiting on the images to be regenerated as I type...I hope to hell it works. Link to comment Share on other sites More sharing options...
Scotty501 Posted November 24, 2010 Author Share Posted November 24, 2010 This must be a htaccess problem. It has screwed up the layout and some links dont work.This is the htaccess I have:- # .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 Please help guys - the shop is not usable and I have an upset client. Link to comment Share on other sites More sharing options...
Scotty501 Posted November 25, 2010 Author Share Posted November 25, 2010 OK when i loaded it via IE8 ( I probably need to clear the cache in ff)the screwy look disappear - but with URL friendly off - i get 404 errors, with friendly url on the link work but no thumbnails. If I check the file property - it shows the correct link and the files is there. Link to comment Share on other sites More sharing options...
Scotty501 Posted November 25, 2010 Author Share Posted November 25, 2010 Im really struggling here. If I turn off Friendly URL - I get 404 errors and if I turn it on - there are some URL errors - and no images - so either way I am stuck with a non fully working store. Link to comment Share on other sites More sharing options...
Scotty501 Posted November 25, 2010 Author Share Posted November 25, 2010 here is a link to the php info - http://perfectpaysupply.com/phptest.phpI cant go back to disbaling friendly URL as it gives me 404 errors. HELP!! Link to comment Share on other sites More sharing options...
lunken Posted November 25, 2010 Share Posted November 25, 2010 I had the same problem.Try to turn off friendly url and save.Turn on friendly urls and THEN create htaccess and overwrite the old one.I guess you have to do it in the right order.Don´t forget to hit F5 when you update your frontend. Link to comment Share on other sites More sharing options...
Scotty501 Posted November 25, 2010 Author Share Posted November 25, 2010 Thanks for the response Lunken - thats what I did - and to be sure I did it again just now - and it is still showing the "?" placeholders for the images. I also regenerated thumbnails - and it still does not work. Just to be sure here is the htaccess file as created a few moments ago:- # .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 Also - I just noticed that some links still give me 404 errors. Top Brands for example show images - but when I click it gives me a 404 the URL is showing as http://perfectpaysupply.com/oatey Link to comment Share on other sites More sharing options...
Scotty501 Posted November 25, 2010 Author Share Posted November 25, 2010 It seems that the images are pointing at the default images - not the uploaded ones - which I guess means there is an issue with the link to the correct file?Does ANYONE know how to fix this before I deal with the dead links issue? Link to comment Share on other sites More sharing options...
jhnstcks Posted November 25, 2010 Share Posted November 25, 2010 Top Brands for example show images - but when I click it gives me a 404 the URL is showing as http://perfectpaysupply.com/oatey That url is incorrectly formatted for prestashop, as there is no manufacturer id included in the url. http://perfectpaysupply.com/25_oatey is the correct url. I presume the urls TopBrands box are hardcoded by yourself. Same goes for all the links in that box. Looks like the shop by brand page has the same problem.This page has the correct url's for all the manufacturers http://perfectpaysupply.com/manufacturer.php Link to comment Share on other sites More sharing options...
jhnstcks Posted November 25, 2010 Share Posted November 25, 2010 Your htaccess file has exactly the same content as mine as I dont think that is your problem. Link to comment Share on other sites More sharing options...
Patric Posted November 25, 2010 Share Posted November 25, 2010 Topic's title changed to make it conform to the forum's rules. Next time, the topic will be deleted.Please read the forum rules. Link to comment Share on other sites More sharing options...
Scotty501 Posted November 25, 2010 Author Share Posted November 25, 2010 I agree with top brands I need to do some further digging - but for some reason the category images are going to default - and not the correct location for the image being uploaded. The products seems fine - its the category images which have suddenly defaulted to the default images.Where do I go from here? As it stands the friendly url cannot be turned off as it gives 404 errors, and if it is on it cause the catergory images to go to default. The correct images and the deafult images are in the same directory - it just not pointing at the right place.Just to clarify - this is the image located at http://perfectpaysupply.com/img/c/99-subcat_thumb.jpgbut on the front office it shows thishttp://perfectpaysupply.com/img/c/en-default-subcat_thumb.jpg Link to comment Share on other sites More sharing options...
Scotty501 Posted November 25, 2010 Author Share Posted November 25, 2010 OK I have limited this down to the images in the subcategories. This is where I see the correct image in back office, but when I save - it shows the default place holders.Does this shed some light? Getting very frustrated with this Link to comment Share on other sites More sharing options...
jhnstcks Posted November 25, 2010 Share Posted November 25, 2010 What happens if you try and save a new image?Also if you turn off friendly url and delete the htaccess file what happens? Link to comment Share on other sites More sharing options...
Scotty501 Posted November 25, 2010 Author Share Posted November 25, 2010 I tried re-uploading the file (its the same picture which works for the products OK) and it still shows the URL if you click on it ashttp://perfectpaysupply.com/img/c/en-default-subcat_thumb.jpgIf I turn off friendly URL - I end up with 404 errors. If I do that and removed htaccess - I get Server 500 errors. Link to comment Share on other sites More sharing options...
jhnstcks Posted November 25, 2010 Share Posted November 25, 2010 Would it be possible to pm me some ftp login details and an admin login so I can have a look to see whats going on. Link to comment Share on other sites More sharing options...
Scotty501 Posted November 25, 2010 Author Share Posted November 25, 2010 Sent - Thanks John appreciate a professional pair of eyes looking at it. Link to comment Share on other sites More sharing options...
Scotty501 Posted November 25, 2010 Author Share Posted November 25, 2010 OK - John kindly took a look at the setup and could not work it out either. We both agree that there was probably a .htaccess file in place - which I overwrote (I know back up ) with the generator after triggering friendly url. If i turn it off - i get 404 errors, so I stuck either way. So any htaccess experts out there able to shed some light?I have asked the host for a copy of the htaccess file prior to the change - assuming they back it up.SOOOO.... Link to comment Share on other sites More sharing options...
Scotty501 Posted November 26, 2010 Author Share Posted November 26, 2010 John has also suggested that the previous htaccess was a customised htaccess file was being used to remove the id numbers from the urls, which is why a lot of links and images don’t work.I guess if I could work out the string used - I could replicate this on the new htaccess - so anyone have an idea? Link to comment Share on other sites More sharing options...
Scotty501 Posted November 26, 2010 Author Share Posted November 26, 2010 Thinking about this - if the orginal htaccess is no longer there - how is the re-write still happening?Im really stuck here. Link to comment Share on other sites More sharing options...
Scotty501 Posted November 26, 2010 Author Share Posted November 26, 2010 OK - I have done some diggin (getting desperate). I am thinking that the original htaccess was using something like this link suggestshttp://www.openscriptsolution.com/2010/05/04/how-to-remove-product-id-from-url-of-prestashop-version-1-2-5/If I could work out how to apply this to the category images, and the Top Brands - I would be half way back I think. Am I barking up the wrong tree? Link to comment Share on other sites More sharing options...
Scotty501 Posted November 27, 2010 Author Share Posted November 27, 2010 No one know what can be done?I am guessing if I can get the "id's" put back in the url for categories and top brands it would work - but how? I assume that with the category id missing is causing the images to display the default image.Please any help would be very useful right now. Link to comment Share on other sites More sharing options...
Scotty501 Posted November 28, 2010 Author Share Posted November 28, 2010 A bit of progress...The categories do have the id in the url - so still stuck there with regard to images not displaying.As for the Top Brands - if I add the id to the url it works - so how do I go about putting the id's back in the links for top brands? Link to comment Share on other sites More sharing options...
Scotty501 Posted November 28, 2010 Author Share Posted November 28, 2010 OK still needing help - but trying as much as I can find out bits and pieces which may trigger something someone reading this may spot.I have another file called .hgignore which is next the same place as the .htaccessIt has the following code within it - could this be why I cant see any category pictures? relre:^\.idea\/.+$relre:^admin-pps\/import\/.+$relre:^img\/c\/.+\.jpg$relre:^img\/p\/.+\.jpg$relre:^img\/m\/.+\.jpg$relre:^img\/s\/.+\.jpg$relre:^img\/scenes\/.*\.jpg$relre:^img\/scenes\/thumbs\/\*\.jpg$relre:^img\/su\/.+\.jpg$relre:^img\/tmp\/.+$relre:^tools\/smarty\/compile\/.+$relre:^tools\/smarty\/cache\/.+$relre:^wp_blog\/wp-content\/uploads\/.+$relre:^pdf\/.+$relre:^download\/.+$relre:^do_update$relre:^sitemap.xml$ A shot in the dark - any advice. Link to comment Share on other sites More sharing options...
jhnstcks Posted November 28, 2010 Share Posted November 28, 2010 But why do some images work fine and other not? Link to comment Share on other sites More sharing options...
Scotty501 Posted November 28, 2010 Author Share Posted November 28, 2010 Yeah - valid point John. I'm clutching at straws tbh. It only seems to affect the category and subcategory images. If I could just figure that out I could look at the other issue - this seems so simple, but clearly not. All the images are in the correct folder, they upload correctly - but just wont display - very odd. Link to comment Share on other sites More sharing options...
Scotty501 Posted November 30, 2010 Author Share Posted November 30, 2010 OK progress. I have managed to get my hands on the orginal htaccess file - and it seems like an awful lot of re-writing going on. It appears to have the friendly url re-write added at the bottom. When I turn on friendly URL it kills the pciture on the categories still - but at least now I can turn it off.Any suggestions on how I make this work with friendly URL.I have attached the htacces file as it is quite large. htaccess.txt Link to comment Share on other sites More sharing options...
Scotty501 Posted December 1, 2010 Author Share Posted December 1, 2010 I think moderators can close this thread - no solution to the issue, and there other threads stating the same thing. Shame it will kill off the project - but thats life. Link to comment Share on other sites More sharing options...
cathosta Posted January 4, 2011 Share Posted January 4, 2011 I am having the same problem...not good... 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