Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

new install - Sub-domain help:(


helpme:(

Recommended Posts

Posted

We are planing to redesign our shop and was wondering if it was a bad idea to create the shop in a sub-domain until it is done, then move it to the root later.

 

eg: http://demo.website.com ==> http://website.com

 

The reason we don't want to create it in the root or in another directory is because the site is currently live and we don't want to mess with its files as well as get any of the pages indexed by spiders.

 

Advice/Suggestions would be appreciated. Thanks :)

Posted

Hi,

 

My opinion.

 

Yes it is a good idea!

 

Create a subdomain/folder

 

put a robot text file

 

 

# go away

User-agent: *

Disallow: /

 

In the the new DEVELOPMENT folder to prevent the pages being indexed twice by google.

 

I personally also password protect the new folder from cpanel or whatever.

 

The only question is do you want to use the same database or create a new one probably better a (new...duplicate) database just in case anything goes wrong with the work.

 

Remember any database changes when tested will have to then be made also on the live shop database after testing on the development site.

 

When finished I would then also put a permanent redirect in the htaccess of the development site leaving it in the development subdomain, thus letting me have a working backup of my site in case I need it quick (hacking/future development or whatever) which until I remove the permanent redirect no one can access.

 

remember the includes/configure.php and admin/includes/configure.php will have to be adjusted.

 

Just my opinion maybe somebody else has a thought on this.

To improve is to change; to be perfect is to change often.

 

Posted

I would recommend not moving a shop to the root. It's easy to overlook some configuration detail that needs to be changed when you move it. Just install it into a subdirectory (not a subdomain), and when you want to go live, you use redirection from the root or wherever. If there is no link to that subdirectory from your main site (or anywhere else, such as this forum), search engines should never see it (it's an isolated island). In general, it's good to keep applications out of the site root, and only have system files there (e.g., .htaccess, robots.txt, php.ini, error pages, etc., and perhaps a landing page with links to your applications). Keeping applications (such as osC) in their own subtrees keeps them out of each other's hair, and makes it easy to cleanly install, remove, update, or edit each application. Just use redirection to jump from the root to your single application, or a landing/home page with links to go to multiple applications.

Posted

In line with what MrPhil said, a good hosting service will let you point your URL to any folder you want. So develop your site in a new folder, then just move the URL when you're ready. Don't forget to remove any access protection, robots.txt, etc. when you go live. I've used this trick to keep a copy of the live site for testing, then just switch folders when it's time to take the changes live.

 

You could have a subdomain pointing to your test folder if you want, or use the domain that came with your hosting account to get to the test site. You just need to remember which folder has the live site.

 

I would always keep a second database though. It's easy to make changes to your development database that will break functions in the live store. Then you just have to remember to sync the test database to the live one before switching over.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Posted

Hi,

 

Sometimes I can not see the wood for the trees :thumbsup:

Just as the guys said pointing the your URL when finished to the new folder saves a lot of work and maybe as MrPhil said prevents mistakes.

 

John

 

PS: will save me a bit of work as well

To improve is to change; to be perfect is to change often.

 

Posted

Thanks everyone for the suggestions and comments. From what were understanding you all don't recommend osC to be in the root, Why is that? Isn't it better for osC to be in the root then in another directory? We've been told having your site in another directory vs your root will effect you search engine ranking. So whats the deal?

 

 

http://website.com/index.php Vs http://website.com/osc/index.php

 

 

Would appreciate your views on this. Thanks.

Posted

I certainly do recommend putting your osC store in the root, unless there is a compelling reason not to. One compelling reason would be that the store is only a minor part of a larger site. If your store is the main reason for your site to exist, by all means put it in the root.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Posted

I would put it anywhere you want, but realize that in root means that you may not like the structure later on if you decide to change something.

 

And I recommend building your shop in the directory that it will eventually be in, but use directory security to prevent access from anyone but yourself, until you are ready to go live. Doing this, IF YOUR SHOP IS IN ROOT you will not be able to allow the spiders to index your site while you are in development.

Community Bootstrap Edition, Edge

 

Avoid the most asked question. See How to Secure My Site and How do I...?

Posted

Hi,

 

The shop will be indexed a lot more often by google spiders in the root I tested this a year or two ago!!

So the shop, if it is your main site should eventually be in the root for SEO reasons.

Very important to make sure the robot text does not appear in the live site directory as a mistake here can take many months to correct by google!!

 

My opinion only

 

John

To improve is to change; to be perfect is to change often.

 

Posted

Read http://www.catskilltech.com/freeSW/SMF/faqs/index.html#root for a discussion of reasons for and against installing an application (such as osC) in the root.

 

Ok, I thing we got it.. This link was very informative, thanks Phil. So can this be applied to our .htaccess file and still work properly with osC?

 

RewriteEngine On 
RewriteCond %{REQUEST_URI} !^/forum [NC] 
RewriteRule ^(.*)$ http://yourdomain/forum/$1

 

RewriteRule ^(.*)$ /forum/$1

Posted

If you use the second form of the RewriteRule (without the http), it should be transparent to search engines. Your configure.php files should declare your store to be at /, while .htaccess rewrites / to /forum (unless it's already /forum). Watch out if you mix in any SEO contributions -- they may have to be tweaked to point to the right place.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...