Jump to content

Using index.php instead of index.html


Guest

Recommended Posts

Hi

When I first started my trip down cubecart way my intention was to have my initial index.html and a seperate sheet for the shop. Due to this I installed Cubecart in a seperate foder ie

public_html/shop

with the index.html file in the root ie

public_html/index.html

After learning more about the functionality of Cubecart I would like users to go straight to this part of the site and bypass the index.html file.

After reading other posts I believe that, if correctly set up, the index.php will act as the index.html when it is not present. However I believe that this needs to be in the root file ie (I assume) :

public_html/index.php

My question is this:

What is the process to move the contents of the shop folder (the cubecart files) into my root directory? I assume that it is not as simple as "cut and paste".. Do I need to un-install and re-install? If so how do I uninstall?

Many thanks in advance

T

Link to comment
Share on other sites

Aside from whatever anyone may answer in terms of the approach you have requested, there is a simple alternative. Redirect /index.html to /shop/.

If your hosting service offers cPanel, there's an icon on the cPanel Home Page labled, "Redirect." Just make sure you select the "Permanent" option.

Good luck!

Link to comment
Share on other sites

Hi

Thanks for the quick reply, I tried it in cPanel and got a Redirecting to a redirection loop error. Hence I did a bit of digging on the internet and found that you can do the same using the .htaccess.

The link to the forum with the explanation is:

http://www.trap17.com/index.php/redirection-loop_t49392.html

Basically I added the line

RedirectMatch permanent ^/$ http://conversationsinspanish.com/shop

to my .htaccess file and it worked like a drem.

Saying that, even though I have done it this way, I am still interested to hear comments on this method, or, if ther is another way of doing it, anyone?

T

Link to comment
Share on other sites

Hi,

Jersey Joe has offered the easiest solution- and it looks like you've learnt about about .htaccess :-)

Moving the store isn't too painful. As you've got cPanel, before you do anything, create a full account backup.

This will pack the entire account into a single file that you can download. (and keep on the server)

If it all goes wrong, you can restore from this file.

Moving the store is a matter of moving all the files from your subdirectory to the new location, and then editing /includes/global.inc.php (the core CubeCart config file) to point to the new location.

There are about 2 or 3 settings (only about 10 lines in the file), which you'll need to tweak, but just remove "shop" for each line should do it.

The database does not contain the absolute location of your store, so you don't need to make any changes there. If the move goes wrong, you don't need to delete the database.

Remember to make images/uploads and images/uploads/thumbs to 777 permission, otherwise you won't be able to upload images or create thumbnails.

Hope this helps,

Jason

Link to comment
Share on other sites

Guest Third Eye Enterprises LLC

I'm having a similar problem. I installed all files to /BowsofJoy/store/ but now when I type in my url (http://www.holyguerrilla.com/BowsofJoy/store) mypHpadmin login page keeps coming up. I have a separate site (www.holyguerrilla.com/BowsofJoy) full of all the html pages I created before ever having known about cubecart. Do I have to delete those pages or move the contents of the /store/ directory into the root /BowsofJoy/ folder? I haven't added products yet to my cubecart and I'm still trying to figure this all out, but does the problem go away once I add my products or is there something I have to do?

Thanks!!

Joy

Link to comment
Share on other sites

Hi Guys

Many thanks for your feedback and advice, the way I see it is that there are three alternatives which are:

1. Use cPanel to reroute the address

2. Move the complete shop file to the root directory

3. Use .htaccess

The first is by far the most simplest, however if you are rooting to a sub directory of the same root then the system won't let you and causes a redirection error.

The second option is more tecy and runs the risk of human error which could result in a database corruption. The good thing about this is that if it is a new site / database the impact is predominantely time and nerves. Also the way I see it is that the downfall of putting your shop directory into the root is that if you need to close down the shop, the rest of the website closes as well.

Therefore, for it's simplicity I am going to go for option three and the .htaccess change. In reality it takes a couple of minutes and can be reversed easily.

Rgds

T

Link to comment
Share on other sites

  • 1 month later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...