Page is a not externally linkable
lm1200 - 2:26 am on Feb 20, 2013 (gmt 0)
Hi,
I am moving a website from a self-managed platform to a hosted solution. It's an e-commerce website.
The idea is to leave a homepage on the self-managed server with links pointing to the new site, which has a sub-domain attached to it.
Domain is www.example.com and the sub-domain is store.example.com.
I have created a rule to do this and it is working fine.
Also, whilst in transition I don't want to disable the old store, I want to re-direct the individual links to products and store categories based on the requested URL. This is because if someone is searching for a particular product, rather than visiting the store front, the results from search engines are for the old store links.
So, I want to be able to redirect any requests for www.example.com/store/product.html to store.example.com/product.html.
Here are the contents of the .htaccess I have been working on.
RewriteEngine on
DirectoryIndex index.html
RewriteCond %{HTTP_HOST} ^example\.com [OR]
RewriteCond %{HTTP_HOST} ^www\.example\.com
RewriteRule ^store/(.*)$ "http\:\/\/store\.example\.com\/$1" [R=301]
RewriteCond %{HTTP_HOST} ^example\.com$ [OR]
RewriteCond %{HTTP_HOST} ^www\.example\.com$
RewriteRule ^example.com "http\:\/\/example\.com\/index\.html" [R=301,L]
The second rule works put not the first.
Looking for help to get it working please.
And, if anyone can provide some background info on the impact on SEO of doing this, that would be gratefully received.
Thanks in advance.