Forum Moderators: phranque
#List of 5 redirects for Google Adwords
RewriteCond %{HTTP_HOST} ^(www\.)?example\.com
RewriteRule ^shop/buy-apparel-clothing-shirts\.html$¦^shop/new-wholesale-accessories-clothes\.html$¦^shop/free-posted-shipping-services\.html¦^shop/singapore-online-shopping-business\.html¦^shop/women-fashion-dresses-bags\.html$ http://www.example.com/shop/ [R=301,L]
Basically, it redirect 5 different 'fake' URLs for Adwords to http://www.example.com/shop/
Is it ok i do it this way OR i should have 5 separate URL rewrite rule for each fake URL?
[edited by: jdMorgan at 5:22 pm (utc) on Nov. 30, 2009]
[edit reason] example.com [/edit]
RewriteRule ^shop/(buy-apparel-clothing-shirts¦new-wholesale-accessories-clothes¦free-posted-shipping-services¦singapore-online-shopping-business¦women-fashion-dresses-bags)\.html$ http://www.example.com/shop/ [R=301,L]
Replace all broken pipe "¦" characters in code found here with solid pipes before use; Posting on this forum modifies the pipe characters.
Note that SEO-wise, it's not a good idea in general to redirect a lot of URLs to your home page; If these pages have been removed and no direct replacement page is available, then a proper 410-Gone response is preferred. The custom error page for 410-Gone should contain -at a minimum- a short, friendly, and somewhat apologetic explanation that the page has been intentionally removed, and text links to your home page, HTML site map, relevant product category pages, and your site-search facility, as applicable.
This may not apply to your current situation if you're doing this so that you can 'track' incoming Adwords clicks by their URLs, but is a more-general rule for replacing 'real' page URLs.
Also, consider that you might be able to simply use 'fake' query strings for your 'fake' URLs, in which case you would not necessarily need to redirect these requests at all:
Example Adword URL: http://www.example.com/shop/?ga=singapore-fashion
Jim