marty.net 1001 Postcards Love Love Love Meep Meep ZenZodiac DailyQuotation

YOU ARE HERE:
Setting CP in a root directory

HOME

CPSHOP|

|

|

EMAIL MARTY
  marty.net message board
  « Setting CP in a root directory »
Welcome, Guest. Please Login or Register.
12/13/17 at 19:03:11
Home Help Search Login Register
   marty.net message board
   About cpshop
   Customization Help
   Setting CP in a root directory
(Moderator: Marty)
Pages: 1 Reply Notify of replies Send the topic Print 
   Author  Topic: Setting CP in a root directory  (Read 1675 times)
brickholius
Silver Dragon
***

Posts: 42



Go Scots!
   

E-Mail
Setting CP in a root directory
« on: 09/22/04 at 13:04:20 »
Reply with quote Modify message

Hello Marty,

Currently I am running CP shop with file structure like so...

http://www.xxxxxxxxxx.com/cgi-bin/store/shop.cgi/coolshirt
("xxxxxxxxx" being a fake domain name and "coolshirt" a fake shirt or store)


I have two "Can I" questions and if the answer is yes then "How?"  

1. Can i run it in the root directory so it would be...

http://www.xxxxxxxxx.com/coolshirt

If i can do number one...does that mean I am stuck with the stiff template structre for my home page.



2. Given my current directory structure how do i change it to

http://www.xxxxxxxxx.com/store/coolshirt
Logged
Marty
Administrator Dragon
*****

Gender: male
Posts: a whole lot



That's me. :)
   

WWW E-Mail
Re: Setting CP in a root directory
« Reply #1 on: 09/22/04 at 20:06:33 »
Reply with quote Modify message

I could write a book with the potential answers to those questions, but I'll try to keep it short.  Here are 5 ways to do it, in decreasing order of complication (and decreasing order of effectiveness).

1. If you have mod_rewrite installed -- a topic that is far too expansive to explain here -- then you can use it to automatically rewrite the URLs on the server side.  (Essentially, your website receives a request for /shirt and converts it to /cgi-bin/store/shop.cgi/shirt internally.)

2. If you can a) run cgi-scripts without a file extension, and b) run cgi-scripts from any directory, then you can rename the file /cgi-bin/store/shop.cgi as /store or /coolshirt (with no .cgi on the end) and try to run it that way.  This usually only works on a few servers.

3. You can use the php solution to create a subfolder called /coolshirt, and put an index.php file in there that embeds cpshop.

4. Setup an HTML-based store homepage, and have it located at /coolshirt, but point to the rest of cpshop for everything else.

5. Place an empty page at /coolshirt, and place a javascript redirect in the page that bounces the visitor to /cgi-bin/store/cpshop.cgi/coolshirt.
Logged

--
Regards,
Marty·.¸¸.·´¯`·.¸¸.-> marty@marty.net
Ryann
Green Dragon
*

Gender: female
Posts: 7



Mmm... Lasagna
   

WWW
Re: Setting CP in a root directory
« Reply #2 on: 11/09/05 at 13:08:11 »
Reply with quote Modify message

This is an old thread but I thought I would add my solution for showing my shop in the root directory.

I am able to run PERL scrips in any directory on the server so in my instance I have my shop.pl file right in the root of my domain. I wanted the home page to appear when you visited the root domain url.

All I did was access my domain host admin control panel and add shop.pl into my default documents list.

As long as there isn't a conflicting document with a higher priority (i.e. default.htm, default.asp, default.php) in the directory you are accessing it will use shop.pl as the default.

I am running my site on a Windows 2003 server - its in a reseller account so I have access to my own domain administration.

If you don't have access to your domain admin you can probably contact your host to do this for you.


~R
Logged
Pages: 1 Reply Notify of replies Send the topic Print 
Jump to:


marty.net message board (http://www.marty.net/cgi/marty/board/messageboard)

Powered by YaBB 1 Gold - Release (Yet Another Bulletin Board)
Copyright © 2000-2001, X-Null. All Rights Reserved.