Quote Originally Posted by bonnit View Post
im so sorry but i have been studying this thread for some time now trying to redirect a dynamic page (/index.php?main_page=product_info&products_id=537) to my index page (well preferably to the replacement product if possible but index if this is too complicated) and i am very out of my depth

im not using any seo mods to change urls, the only things i am using are rewrites for non www to www and index to root, but i can't for the life of me get the 301 redirect to work and i am trying to follow what you are saying about rewrite instead of redirect but again im really struggling, i dont know much about htaccess at all and im desperately trying to learn. is there anyway you could give a working example of what you are speaking about above please? i only have about ten products to redirect but they have pretty good rankings so i would like to redirect some of that back inot my site if possible.

with regards to the non www to www code i have used, i struggled with getting it to work on my server and ended up having to contact them direct for the code as no others worked that i had come across so that is what im using, i dont know if this is the reason for the old product 301 to diff page isnt working?

my htaccess is below:
Code:
RewriteEngine On

#canonical redirect from non www to www
RewriteCond %{HTTP_HOST} !^(www\.livvylou\.co.uk)?$
RewriteCond %{REQUEST_URI} !^/admin [NC]
RewriteRule (.*) http://www.livvylou.co.uk/$1 [R=301,L]

# Index Redirect to root
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.(html?|php)\ HTTP/
RewriteRule ^index\.(html?|php)$ http://www.livvylou.co.uk/? [R=301,L]

ErrorDocument 404 /index.php?main_page=page_not_found

#redirect rss page to actual feed
redirect 301 /rss.php http://www.livvylou.co.uk/feed/general/feed.xml

#Redirect old products to index
RewriteRule ^/index.php?main_page=product_info&products_id=537 http://www.livvylou.co.uk/ [R=301,L]
any help at all would be very much appreciated.
Try something like this


RewriteCond %{QUERY_STRING} products_id=537
RewriteRule (.*) http://www.livvylou.co.uk/$1? [R=301,L]
~Melanie