Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Domain Name going to root directory


sand_danser

Recommended Posts

I asked in "General Support" a couple of days ago about how to re-direct my domain name as it was pointing to my root directory and not the "catalog" directory as needed to show my page.

After a lot of e-mails to domain hosts and server hosts I found out that web forwarding on my domain name hosts site is disabled because I've directed my named servers away from theirs and to my current server. :angry:

I had no way of accessing any web forwarding so asked my PHP egghead friend who got me sorted & re-directed in 5 minutes flat B)

Apparently, when you upload & install Oscommerce 2.2 there's no index.php (homepage) for your domain name to find from your server so you need to make a file called INDEX.php, and enter the following; (copy & paste it into a new file in NOTEPAD or similar).

 

<?

header("Location: http://www.mysite.com/catalog");

exit;

?>

 

Save & upload the file to your ROOT directory (close the CATALOG FOLDER so it shows the + sign)

 

You should now be fixed and your page will show your CATALOG page :)

 

I hope someone makes use of this as I found it really difficult to re-direct mine. These forums move so fast that this will be on the 3rd page of this forum by tomorrow so grab it now :D

Link to comment
Share on other sites

Not everyone knows what a root directory is. I explained in detail so that if your new to FTP it would help understand. It would be easy to upload the file to your CATALOG folder and overwrite the existing one, then you'd really be in trouble! (as a newbie)

Link to comment
Share on other sites

I would think that a Redirect or RedirectPermanent line in a .htaccess would be a better solution to do this. But the best solution is to move the content of the catalog folder to the top level of the site (and update the configure.php files accordingly.)

Link to comment
Share on other sites

Okay, so if I move the catalog directory to the root directory via FTP, what files need to be changed in configure.php? How many files need to change. What do I change? I am wanting to do this, but needing some more specific information. I'm sure I can figure it out, but just don't want to screw up my website after putting so much time into it.

 

Thanks for understanding that there are so many of us newbies still learning. Just don't want to make a huge error.

 

Thanks,

Shar

Link to comment
Share on other sites

  • 1 year later...
I would think that a Redirect or RedirectPermanent line in a .htaccess...

 

 

QUESTION #1 : What is the actual difference between the .htaccess command "redirect" and "redirectpermanent"?

 

I have recently removed the "catalog" directory so that my site runs straight off of root. i.e. http://www.yourdomain.com/index.php instead of http://www.yourdomain.com/catalog/index.php

 

I simply added the following to my root .htaccess:

 

redirect /catalog/ http://www.yourdomain.com/

 

This SEEMS to work great.

 

QUESTION #2 : Since my site has already been spider'ed (is that the same as "indexed") and shows up in searches with the "catalog" directory in the url...is there anything i need to do or expect or any tip/tricks for me so my site will get indexed/spider'ed with the new urls?

 

Thanks in advance!!!

 

Regards,

T-DOGG

Link to comment
Share on other sites

QUESTION #1 : What is the actual difference between the .htaccess command "redirect" and "redirectpermanent"?

 

I have recently removed the "catalog" directory so that my site runs straight off of root.  i.e.  http://www.yourdomain.com/index.php  instead of http://www.yourdomain.com/catalog/index.php

 

I simply added the following to my root .htaccess:

 

redirect /catalog/ http://www.yourdomain.com/

 

This SEEMS to work great.

 

 

I don't understand what you mean. Do we just open .htaccess with notepad and add "redirect /catalog/ http://www.yourdomain.com/" to the bottom line? We're talking about the .htaccess that WAS originally in the catalog folder right?

Link to comment
Share on other sites

I don't understand what you mean. Do we just open .htaccess with notepad and add "redirect /catalog/ http://www.yourdomain.com/" to the bottom line? We're talking about the .htaccess that WAS originally in the catalog folder right?

 

Not quite...there should be an .htaccess file in your root directory...like httpdocs or htdocs or www or something like that...what ever directory your host has below catalog (the directory that catalog is in)...the directory below your typical osc installed files.

 

but...YES...you can edit that file in notepad with that line (obviously specific to your domain).

 

here is my example....go to:

 

http://www.stopstickers.com/catalog/index.php?cPath=22_38

 

now note the url...no catalog.

 

I had to do this because if you google "stopstickers", the indexed results include the catalog url. all better now!!!

 

Regards,

T-DOGG

Link to comment
Share on other sites

Not quite...there should be an .htaccess file in your root directory...like httpdocs or htdocs or www or something like that...what ever directory your host has below catalog (the directory that catalog is in)...the directory below your typical osc installed files.

 

but...YES...you can edit that file in notepad with that line (obviously specific to your domain).

 

here is my example....go to:

 

http://www.stopstickers.com/catalog/index.php?cPath=22_38

 

now note the url...no catalog. 

 

I had to do this because if you google "stopstickers", the indexed results include the catalog url.  all better now!!!

 

Regards,

T-DOGG

 

Ohh, I see. This is for those people who choose to install it in the catalog folder rather than the root directory. It wasn't working for me so I deleted everything and reinstalled it in the root directory so it's looking better now.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...