ruttroh Posted November 27, 2009 Share Posted November 27, 2009 I have friendly urls enabled, but when one of my product pages shows up in google search results, it doesn't show the friendly url but rather shows the address as mysite.com/product.php?id_product=76. My htaccess file is below. Is there anything I can do to force google to use the friendly url address?I'd really appreciate any help or suggestions. # .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 RewriteCond %{HTTP_HOST} ^www.mysite.com$ [NC] RewriteRule ^(.*)$ http://mysite.com/$1 [R=301,L] 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...
snoon Posted December 10, 2009 Share Posted December 10, 2009 i have same problem Link to comment Share on other sites More sharing options...
palcek11 Posted February 2, 2010 Share Posted February 2, 2010 Search engine hasn't indexed your site again yet. Link to comment Share on other sites More sharing options...
tomerg3 Posted February 3, 2010 Share Posted February 3, 2010 Actually Prestashop still has links in the site to the old Non Friendly URLs, those are used for pagination, sorting and similar links.The problem is that once google sees that address, unless you tell it that it is no longer in used (using a 301 redirect), than they will keep going to it and indexing it.I have create a module (Duplicate URL Redirect) that automatically redirects all duplicate URLs, you can check out my site or the "Offers" section for more info Link to comment Share on other sites More sharing options...
palcek11 Posted February 5, 2010 Share Posted February 5, 2010 Quick question. I've enabled friendly url and made 301 redirects. Now I noticed in the statistics, that sometimes some customers are currently at page 404.php. I've checked in FO, everything is OK, every link works.Do you maybe know why the stats show 404? Link to comment Share on other sites More sharing options...
tomerg3 Posted February 5, 2010 Share Posted February 5, 2010 What 301 redirects did you do?Any idea what are the pages that lead to the 404 error?Do you have Google webmaster tools set up?Did you try googling site:yoursite.com to see what pages google has indexed?Did you delete any pages lately? if there are still links to them, search engines will keep crawling them and will take a while to remove them. Link to comment Share on other sites More sharing options...
palcek11 Posted February 6, 2010 Share Posted February 6, 2010 What 301 redirects did you do?I used your module duplicate URL redirect.Any idea what are the pages that lead to the 404 error?If I look stats by using module statstrackvisits:- one visitor came to the first page and stayed there for 10 hours - resulting in 61 error: page 404.php- once I tried to use send to friend module, which works perfectly, stats shows that there was several 404.php pages.I see a pattern when a visitor is inactive for few minutes that leads to 404 page in stats.Do you have Google webmaster tools set up?Yes, I did. There is no not found crawl errors. Only restricted by robots and unreachable.Did you try googling site:yoursite.com to see what pages google has indexed?Yes. Since I did duplicate 301 redirects 2 days ago, google didn't indexed them yet. There are still old non-friendly links.Did you delete any pages lately? if there are still links to them, search engines will keep crawling them and will take a while to remove them.No, I didn't delete any pages.Oh, and another thing, since I have an expert "on the line". I had a question here, if you might have a clue.Thanks in any case. Link to comment Share on other sites More sharing options...
tomerg3 Posted February 6, 2010 Share Posted February 6, 2010 I google webmaster tool is not reporting it, than it may be related to a bad URL that the user is entering.The other thing that comes to mind is that you have a link to a missing image somewhere which can cause a 404 error.If when you browse your site, you don't get that error, I wouldn't worry too much about it, especially if it doesn't show up in the webmaster tools. Link to comment Share on other sites More sharing options...
palcek11 Posted February 6, 2010 Share Posted February 6, 2010 What you say about images might be possible, because some smallest thumbnails are not generated (don't know why). Link to comment Share on other sites More sharing options...
Guest Posted February 26, 2011 Share Posted February 26, 2011 HII am facing same 404.php in visitors list issueAny one have solution for it?Thank you in advance 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