I have successfully added "reviews list" and "add review form" to the product page.
Now I just want to completely disable reviews page (http://example.com/review/...
)? (so search engines won't accidentally find and crawl it, noindex
and canonical
aren't an option).
Thank you for help!
Best Answer
There are several routes in the
Mage_Reviews
module, and you likely don't want to disable them all. Here's a list gleaned from Mage/Reviews/controllers/:review/customer/(index)
- customer account view of their reviewsreview/customer/view/id/{review id}
- customer account view of a single reviewreview/product/list/id/{product id}/[(category)/{category id}]
- list of reviews for a productreview/product/post
- process action for posting a reviewreview/product/view/id/{review id}
- individual view for a single product review - keep?Bold = paths which you do/might want to map & redirect, italics = paths to keep.
Whereas there is content which can and should be used for the review requests, this seems best accomplished using an observer. To catch the
review/product/list
route the observer should observe thecontroller_action_predispatch_review_product_list
event in the frontend event area and set an HTTP 301 redirect to the product page. The 301 will of course be used by search engines to update links and transfer some of the link juice.And in your module's observer, the redirect method: