Ann Posted October 30, 2009 Share Posted October 30, 2009 Hi,My shop is running with V1.1, url rewriting is on, my .htaccess file seems ok, but despite this, some of my pages are indexed with the url " ... product.php?id... " . How can this happen, and how can I get the robots to read and index only the rewrited urls ?Thanks Link to comment Share on other sites More sharing options...
Mogul Posted October 30, 2009 Share Posted October 30, 2009 Is it possible the pages haven't been respidered since you changed the URLs? Link to comment Share on other sites More sharing options...
Ann Posted October 30, 2009 Author Share Posted October 30, 2009 Thanks for answering...Well, I thought about that, but the weird thing about it is that old pages get spidered with the correct url rewriting but recent ones don't...this really baffles me... Link to comment Share on other sites More sharing options...
Mogul Posted October 30, 2009 Share Posted October 30, 2009 Maybe try 301 redirects? Link to comment Share on other sites More sharing options...
Ann Posted October 31, 2009 Author Share Posted October 31, 2009 Yes, I though about using this kind of redirection, but I don't know about the correct script to useThis is my .ht access :# URL rewriting module activationRewriteEngine onRewriteCond %{HTTP_HOST} ^ann-secret.com$ [NC]RewriteRule ^(.*)$ http://www.ann-secrets.com/$1'>http://www.ann-secrets.com/$1 [R=301,L] # URL rewriting rulesRewriteRule ^([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]# Catch 404 errorsErrorDocument 404 /404.phpSetEnv PHP_VER 5SetEnv REGISTER_GLOBALS 0ErrorDocument 401 http://www.ann-secrets.com/ErrorDocument 403 http://www.ann-secrets.com/ErrorDocument 404 http://www.ann-secrets.com/ErrorDocument 500 http://www.ann-secrets.com/ Link to comment Share on other sites More sharing options...
Ann Posted October 31, 2009 Author Share Posted October 31, 2009 I added this line:RewriteRule ^([^/]+)/page-([^/]+).html index.php?id=$2&cat;=$1 [QSA,L]Seems to work ok by now.... Link to comment Share on other sites More sharing options...
tomerg3 Posted January 7, 2010 Share Posted January 7, 2010 I have created a module that redirects all duplicate URLs to the default SEO friendly versionhttp://www.prestashop.com/forums/viewthread/39736/offer_bids_and_prestations/module_duplicate_url_redirect__redirect_all_duplicate_and_non_seo_friendly_urls_to_the_default_friendly_url Link to comment Share on other sites More sharing options...
Recommended Posts