.htaccess 301 redirect syntax
When I look in my webmaster tools account I see that I have lots of duplicate URL's. The duplicates are due to strange numbers being added to 开发者_如何转开发the end of each product parameter such as:
/index.php?route=product/product&product_id=158?ax13g76h
I need to use syntax to strip anything after the =158
UNLESS it is one of the parameters I use to order e.g sort, page or order. Can anyone suggest the syntax that I would need to do this via a 301 redirect?
Why do you want to redirect these pages?
Is your application failing to render the result if requested this way?
This is certainly done by js (ajax) scripts to avoid browser caching results of the page (new url=> new content), you may break the js behavior with 301 redirect, and you may break the no-cache behavior. On the other side you can maybe need to remove the cache:no or such in the js side to get only 'clean' url requested.
And the 301 will not work, you can be sure the js is altering the 'strange numbers' at each request, so you will still have these url in your webmasters tools.
Fix the webmasters tools maybe? Tell it this is a parameter it should ignore.
精彩评论