fleeced Posted November 29, 2015 Posted November 29, 2015 I am moving my site from the catalog directory to the / root directory. We have been in Google and listed on other sites for years with our catalog urls. What is the best way to redirect traffic from the old catalog urls whilst trying to maintain our Google rankings and ensure the customer gets to the right place from referral links?
MrPhil Posted November 29, 2015 Posted November 29, 2015 Don't do that. Leave your store in /catalog. That way you can add other applications to your site (such as a Wordpress blog) without the two applications stepping on each other and causing problems. Also, customer bookmarks and search engine indices become invalid if you move the store. If osC is currently your only application, it is easy to redirect visitors to your root (/) to the store (/catalog), so visitors don't have to type in /catalog. In /.htaccess, RewriteEngine On RewriteCond %{REQUEST_URI} !^/catalog [NC] RewriteRule ^(.*)$ /catalog/$1 [L] If you are on a Windows (IIS, Windows Server, etc.) or other non-Apache server, you may have to do it a different way. Eventually, when you add other applications and create a landing page /index.html with links to the applications, you would remove the above statements from .htaccess (no more rewriting).
fleeced Posted November 29, 2015 Author Posted November 29, 2015 1) Don't do that. Leave your store in /catalog. That way you can add other applications to your site (such as a Wordpress blog) without the two applications stepping on each other and causing problems. 2) Also, customer bookmarks and search engine indices become invalid if you move the store. 1) I was perhaps later going to add a Wordpress blog under the directory mysite.com/blog . That wouldn't cause issues would it? 2) This is why I wanted a redirect solution so anyone coming from a referral site to the old url will automatically get a redirect. I am wishing to install BS 2.3.4 in the root and wanted to ditch the 2.2 catalog site I have (as I don't think it looks good to UK customers) and install SEO URLs too.
clustersolutions Posted November 29, 2015 Posted November 29, 2015 If you are using Linux based hosting, add a permanent 301 redirect after launching the new BS site should do it... RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} ^domain.name/catalog/ RewriteRule (.*) http://domain.name/$1[R=301,L] Putting OSC in root and adding WP to a subdir should be no problem...PM me if you are interested in seeing the latest in action. I am working on a few sites currently sharing the WP and OSC libraries...best of both worlds... This OSC Wordpress integration may help too... 1) I was perhaps later going to add a Wordpress blog under the directory mysite.com/blog . That wouldn't cause issues would it? 2) This is why I wanted a redirect solution so anyone coming from a referral site to the old url will automatically get a redirect. I am wishing to install BS 2.3.4 in the root and wanted to ditch the 2.2 catalog site I have (as I don't think it looks good to UK customers) and install SEO URLs too.
Jack_mcs Posted November 29, 2015 Posted November 29, 2015 If your intention is to get rid of catalog from the url, check if your control panel has a redirect section. if it does, use that to handle the redirect. Otherwise, add this to the root .htaccess file after the rewriteengine on command: RewriteRule ^catalog/(.*)$ /$1 [R=301,NC,L] You can also leave the files where the are but then you need an additional set of commands to hide catalog from the url. This works well once it is working but can be a pain to setup. I prefer to have the files in the root to avoid the extra handling required for being in the sub-directory. Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons
MrPhil Posted November 29, 2015 Posted November 29, 2015 add a permanent 301 redirect after launching the new BS site should do it... So long as you remove the redirect as soon as you (eventually) create the /index.html landing page, that's probably harmless, though unnecessary. Your store links and SE entries will have /catalog anyway, and it really doesn't matter if someone visits / instead of /catalog directly. Putting OSC in root and adding WP to a subdir should be no problem. It will be a problem if there are /.htaccess entries for osC that cause problems for WP. That's why I advise leaving /.htaccess alone (only site-wide entries, such as adding or removing www.), and putting the osC changes into /catalog/.htaccess and the WP changes into /blog/.htaccess. It can cause very subtle problems to go through osC's URI rewriting first, and then have to possibly undo those changes if in the end the visitor wants to go to WP instead. And vice-versa.
MrPhil Posted November 29, 2015 Posted November 29, 2015 You can also leave the files where the are but then you need an additional set of commands to hide catalog from the url. Not really. If a visitor typed in http://www.yoursite.com(root), there's no harm in their suddenly finding themselves in /catalog. There's no need to conceal from a visitor that they are in the store application (change /catalog to /store if that's a big concern). Leaving all the store links as /catalog means they won't have to change when that WP blog is added, there's a landing page, and the redirect/rewrite is removed.
MrPhil Posted November 29, 2015 Posted November 29, 2015 1) I was perhaps later going to add a Wordpress blog under the directory mysite.com/blog . That wouldn't cause issues would it? It can cause issues. You're better off in the long run keeping all your applications separate, and out of the root. For example, going to WP would first pass through the osC-specific /.htaccess, which could muck it up for WP. Then it would have to pass through /blog/.htaccess, which would have to undo some things that osC did. If all the osC-specific changes are in /catalog/.htaccess, the two applications stay out of each other's way. If you plan for that from the beginning, things will go a lot easier. 2) This is why I wanted a redirect solution so anyone coming from a referral site to the old url will automatically get a redirect. If you leave the store in /catalog, you can redirect visitors to / over to /catalog (until such time as you make a landing page /index.html). All existing links and SE entries will continue to work (until and unless you install the new store in /catalog). The only thing that happens is that visitors to / will (for the time being) instantly find themselves in /catalog. I am wishing to install BS 2.3.4 in the root and wanted to ditch the 2.2 catalog site I have (as I don't think it looks good to UK customers) and install SEO URLs too. Why object to seeing /catalog? Or is the issue that you just want to get rid of your 2.2 store? If that's the case, why not move the 2.2 store to /oldstore (be sure to update the configure.php files) and install the new store in /catalog (or /store, while you're at it, in which case you wouldn't even have to move the old store)? Note that customer bookmarks and SE entries for the old store won't work if you move the old store to /oldstore. You might have them redirected to the entry page for the new store, if you don't want people shopping in the old store any more. You need to think about how existing customer bookmarks and SE entries are going to map to your new store. It's likely that many won't work at all, even if the new store is in /catalog. You might consider letting anything that can't be mapped to the new store fall through to the /oldstore store. Or, you might have anything not clearly for the new store sent to the entry page for the new store. Depending on the format of the old store's URIs (e.g., no SEO) and the new store's (with SEO), you might be able to come up with some simple rules for whether an incoming URI is to go to one store or the other, or whether you can map something intended for the old store into the new store. It would probably be easiest to deactivate the old store completely, install the new store into /store, and map anything (R=301) for /catalog to /store/index.php. It all depends on whether you want to have anything of the old store alive. If you want to keep it alive only until the new store is ready to go live, you could temporarily install the new store into /test or /newstore, and then rename /catalog to /oldstore and /newstore to /catalog (updating all configure.php files too). There are lots of things that can be done, depending on what you want your customers to experience.
Jack_mcs Posted November 30, 2015 Posted November 30, 2015 Not really. If a visitor typed in http://www.yoursite.com(root), there's no harm in their suddenly finding themselves in /catalog. There's no need to conceal from a visitor that they are in the store application (change /catalog to /store if that's a big concern). Leaving all the store links as /catalog means they won't have to change when that WP blog is added, there's a landing page, and the redirect/rewrite is removed. You must have missed the part where I said "If your intention is to get rid of catalog from the url,". Changing catalog to store would definitely cause a problem if redirection isn't added to tell the search engines all of the url's have changed. Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons
MrPhil Posted November 30, 2015 Posted November 30, 2015 It all depends on exactly what the OP is trying to accomplish, whether it's cosmetic or substantive, whether they're going to kill the old store right away, whether they want to preserve incoming old-style links (and SE entries), etc., etc. At the very least, links to the old store should go to the new store's entry page (R=301). The original statement of what they wanted was rather vague and incomplete.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.