Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

New/Move index.php PLEASE HELP


agiftcodotcom

Recommended Posts

My host made me put my store in a sub folder http://www.mydomain.com/catalog. So when people go to my site, I either have to have them "click to enter" or redirect. I want my index.php to be up one level so that when people go to http://www.mydomain.com they enter my store directly. How can I do this? Is there a way I can move my index page up one level, or can I create a psudo index page that will work the same, just up one level? I hope this makes sense. Any help is greatly appreciated! :(

Contributions I used : Updated 06-13-04 23:42

----------------

Vote on My Graphis Poll

Link to comment
Share on other sites

When you log in to your FTP client what is your file makeup like? Does it look like this?

 

domain Root

|

|

Sub directory

|

|

OS files

 

If so, the way i got around the same problem, when i configured the set up incorrectly was to drag all the OS files from the sub to the root directory.

This then created the front page on the main domain name/

 

HTH

 

Luke Dolan

Link to comment
Share on other sites

you may require to change the paths in both includes/configure.php files that is the admin and catalog to reflect the directory change

No longer giving free advice. Please place deposit in meter slot provided.  Individual: [=] SME: [==] Corporation: [===]
If deposit does not fit one of the slots provided then you are asking too much! :P

Is your Osc dated try Phoenix  raising oscommerce from the ashes.

Link to comment
Share on other sites

I was thinking of doing as you are saying and just move it from sub to root, but I don't know anything about SQL and I was afraid I might mess something up. My root is WWW, but my sub is CATALOG, won't some files be looking for a path of CATALOG instead of WWW? Also, since I just got started I don't have any customers yet to have bookmarked me :D So that's not too big of a concern. My biggest concern is losing the products I've already uploaded :blink:

 

But, if you are sure I can simply move from sub to root without losing anything then I will do that. Thanks for your help.

Contributions I used : Updated 06-13-04 23:42

----------------

Vote on My Graphis Poll

Link to comment
Share on other sites

There is documentation here on installing in the root directory. Essentially, your configuration files will need minor adjustments to accomodate the new directory structure - its quite simple.

 

You won't lose any products - they are stored in the database - paths to product images are relative to the 'catalog' directory - we are making your root directory the 'catalog' directory.

 

Matti

Link to comment
Share on other sites

A php header redirect is a line that looks similar to this:

 

<?php

header( 'location:http://www.yoursite.biz/yoursubfolder/' );

?>

 

It function very similar to a meta redirect which used to be used quite often to cheat search engines (and other useful and legal stuff).

 

Although the php header redirect would solve your problem the search engines may frown on its use. As I understand the header redirect will generate a 302 redirect code back to the browser (or SE). he SE's like to see what they are asking for.

 

Another way to accomplish the same thing is to use the htaccess file if you are on an apache server. This would give a server side redirect just like the php header redirect but I don't think it gives the 302 redirect error code. I have not found any evidence that the SE's frown on using the htaccess file to accomplish a redirect.

 

My advice would be to follow Matti's advice and tell your host where to get off as I can not see any reason why they would not allow you to serve your pages as you want. This could be a red flag waving to find a new host. Remember your host ain't your momma, pet or child. It's ok to dump them just like you would any product that does not meet your requirements. You work hard for your money; make them earn theirs.

 

My next advice would be to do some research via your favorite SE and decide which route would be the best for you to follow.

 

Tim

How do you know when you know what you want to do for the rest of your life?

Link to comment
Share on other sites

I am currently using the server side redirect, I just wasn't sure if SE's frowned upon this. If you got to mysite.com, you are automatically sent to mysite.com/catalog. I just didn't know if this is SE friendly. If it is, then all is good and I'll step away from the problem :) If SE's frown upon this then I have issues. Let me rephrase my host saying I couldn't. My host offers OSC as one of their many programs. I think they don't want people installing OSC on the top because they also offer chat/message board/..... and I don't think they want people trying to install OSC on top of MB's and chats and.... so they have you install it in a sub folder.

Contributions I used : Updated 06-13-04 23:42

----------------

Vote on My Graphis Poll

Link to comment
Share on other sites

I maybe out of bounds here but I think you are misinterpreting the idea.

 

If your host offers osc and it is a click here to install osc type thing they put it in a sub directory because they are asuming you already have files in your root web that maybe over-written by an install to the root web so they therefore place the install into a subdirectory.

 

If this is the case you should download the ms2 file from here at osc to your local machine and do your mods then upload to the directory of your choice. Most BB and chat apps will be in a sub folder anyway. I don't recall ever seeing one placed in the root web except for the sites that are nothing more than a BB/Chat site.

 

Tim

How do you know when you know what you want to do for the rest of your life?

Link to comment
Share on other sites

You are correct. (point & click install). Which I'm sure is why it's in a sub. However, I have been adding products to it while it was in the sub, but now am wondering if being in a sub is a problem. If being in a sub and having a server side redirect isn't a problem, then I will run with it as is. If SE's don't like server side redirects, then I have a problem.

Contributions I used : Updated 06-13-04 23:42

----------------

Vote on My Graphis Poll

Link to comment
Share on other sites

I don't think the SE's would have a problem with the server side redirects but with as picky as the SE's are getting you may want to research a few of the seo forums and get a few opinions on the matter.

 

Something you might consider as an alternative to the redirect is a nice index page with a good description of the site targeted at two or three specific keywords and links to the cart and maybe the categories. Be sure to use your keywords in the title, the description, the first paragraph, your links, and <h1> tags for your page heading. I think this would be much better than doing any sort of redirect.

 

Tim

How do you know when you know what you want to do for the rest of your life?

Link to comment
Share on other sites

I thought of making a home page, but I didn't know if this might become a "stall" point for potential customers to say "click to enter?" But, since I do have a free MB and chat, maybe I can actually create a community of some sort which would help drive traffic. hmmmm... things to ponder. Thanks for everyone's help!

Contributions I used : Updated 06-13-04 23:42

----------------

Vote on My Graphis Poll

Link to comment
Share on other sites

The problem with a home page, unless done right, is that if a customer returns to it they may lose the session and need to re-login if they again return to the catalog.

 

Matti

Link to comment
Share on other sites

Eric

 

Have you managed to resolve the issue, did you manage to move everything to the root directory. :D

 

Did you manage to sort out your images issue ;)

No longer giving free advice. Please place deposit in meter slot provided.  Individual: [=] SME: [==] Corporation: [===]
If deposit does not fit one of the slots provided then you are asking too much! :P

Is your Osc dated try Phoenix  raising oscommerce from the ashes.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...