webbusiness23 Posted January 20, 2010 Share Posted January 20, 2010 Hi,i read what a moderator said about URL rewrite and did as he said: created a blank file in your shop’s root directory called .htaccess with chmod 777 permissions, went to Preferences and changed Friendly URL to Yes, clicked Save, then went to Tools > Generators and clicked “Generate .htaccess file” After i've done that all the categories' images look like the attached photo. How can i solve this? Link to comment Share on other sites More sharing options...
tomerg3 Posted January 20, 2010 Share Posted January 20, 2010 Try to recreate the .htaccess file, it seems yours was not created properly.The proper file size should be able 1.8kb Link to comment Share on other sites More sharing options...
webbusiness23 Posted January 20, 2010 Author Share Posted January 20, 2010 I just recreated the .htaccess file and no result. Still getting the same question mark image.Any other ideas? Link to comment Share on other sites More sharing options...
tomerg3 Posted January 20, 2010 Share Posted January 20, 2010 Can you post you htaccess file here? Link to comment Share on other sites More sharing options...
webbusiness23 Posted January 20, 2010 Author Share Posted January 20, 2010 Here is the code from inside it: # .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]+)(\-[_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 Link to comment Share on other sites More sharing options...
tomerg3 Posted January 20, 2010 Share Posted January 20, 2010 Are you sure your server is running Apache with mod=rewrite enabled?You can create a php file with the following command to find out. <? phpinfo(); ?> Link to comment Share on other sites More sharing options...
webbusiness23 Posted January 20, 2010 Author Share Posted January 20, 2010 Yes, i just talked to the support guys from Hostgator (my hosting) and they said it runs apache with mod=rewrite enabled. Link to comment Share on other sites More sharing options...
tomerg3 Posted January 20, 2010 Share Posted January 20, 2010 Hmm, the file looks fine, I also assume that your shop is installed in the root directory.Can you try and change the permissions of that file to 644? Link to comment Share on other sites More sharing options...
webbusiness23 Posted January 20, 2010 Author Share Posted January 20, 2010 Done that too. The file has now 644 permission. No result. I get the same question mark image. Link to comment Share on other sites More sharing options...
tomerg3 Posted January 20, 2010 Share Posted January 20, 2010 What is the URL? Link to comment Share on other sites More sharing options...
webbusiness23 Posted January 20, 2010 Author Share Posted January 20, 2010 What is the URL? I used an URL shortener. Here it is: http://tiny.cc/xjH5kAny subcategory that you choose acts the same: it shows me the same question mark image, instead of the original image. Link to comment Share on other sites More sharing options...
tomerg3 Posted January 20, 2010 Share Posted January 20, 2010 Did you change category.tpl?Your category image is linking to http://www.xxxxx.xx/41/arme-cu-lunetasniper.jpg (which doesn't exist)instead of http://www.xxxxxx.xx/41-category/arme-cu-lunetasniper.jpg (which works just fine). Link to comment Share on other sites More sharing options...
webbusiness23 Posted January 20, 2010 Author Share Posted January 20, 2010 No, i didn't change the category.tpl file.If the second link works fine, can't i just change something in the .htaccess file to make it display the correct category image? Link to comment Share on other sites More sharing options...
tomerg3 Posted January 20, 2010 Share Posted January 20, 2010 you should change the tpl file that creates that image link to add "-category " after the category id.I'm not sure off the top of my head where that would be, I will try to take a look later. Link to comment Share on other sites More sharing options...
webbusiness23 Posted January 27, 2010 Author Share Posted January 27, 2010 Did you get the chance to take a look and figure out which file you are talking about in the above post?Does anyone know the name of the required file to edit? 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