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

YOU ARE HERE:
Regarding Default Home page

HOME

CPSHOP|

|

|

EMAIL MARTY
  marty.net message board
  « Regarding Default Home page »
Welcome, Guest. Please Login or Register.
12/13/17 at 19:00:26
Home Help Search Login Register
   marty.net message board
   About cpshop
   Customization Help
   Regarding Default Home page
(Moderator: Marty)
Pages: 1 Reply Notify of replies Send the topic Print 
   Author  Topic: Regarding Default Home page  (Read 1105 times)
Tony
Gold Dragon
****

Gender: male
Posts: 85



Hello?  Where am I?
   

WWW
Regarding Default Home page
« on: 11/23/04 at 10:36:47 »
Reply with quote Modify message

So I want my site to be:

something.com/store  and not
something.com/store/cpshop.cgi    

I know I can put the url to something.com/store as the home and all the main breadcrumb links will point to it, BUT if people go to

something.com/store/cpshop.cgi, they get my list of links.  I want them to be redirected to /store

Is there a way I'm missing how to do that?  Right now google has already indexed my /store/shop.cgi (I guess from these boards) and I want them to go to my real home page.  

I'm working on doing an include where cpshop says you can include HTML you want, but I just want to redirect people to /store

Thanks!
Logged

----------------
http://www.astphotos.com
Marty
Administrator Dragon
*****

Gender: male
Posts: a whole lot



That's me. :)
   

WWW E-Mail
Re: Regarding Default Home page
« Reply #1 on: 11/23/04 at 11:25:20 »
Reply with quote Modify message

If you look in cpadmin at the "store homepage options," you'll see the Homepage as SSI option.  Set that to "no" if you want cpshop to automatically redirect to your Main Store URL.
Logged

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

Gender: male
Posts: 85



Hello?  Where am I?
   

WWW
Re: Regarding Default Home page
« Reply #2 on: 11/23/04 at 11:29:34 »
Reply with quote Modify message

Hey Marty

When I did that, it would just print out

Location: htt p://mysite.com/store

and not actually do anything else.  
Logged

----------------
http://www.astphotos.com
Marty
Administrator Dragon
*****

Gender: male
Posts: a whole lot



That's me. :)
   

WWW E-Mail
Re: Regarding Default Home page
« Reply #3 on: 11/23/04 at 11:38:39 »
Reply with quote Modify message

The Location: line is supposed to be a header, which tells the browser to go to that page.  But for whatever reason, your server is printing out a Content-Type: text/html header before anything else, which is keeping the redirect from working.

Did we customize something in your cpshop.cgi file to force a text/html header every time?
Logged

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

Gender: male
Posts: 85



Hello?  Where am I?
   

WWW
Re: Regarding Default Home page
« Reply #4 on: 11/23/04 at 11:42:26 »
Reply with quote Modify message

#!/usr/bin/perl
$| = 1;
print "Content-Type: text/html\n\n";


we did that b/c content-type was getting printed before my php file, but let see if i remove that $| = 1; line....

That's right, now it works, but when you go to an item, it gives an internal server error:

http://www.astphotos.com/store/shop.cgi/all_flower_photos?target=prod&page=2&trail=&st=&p=astphotos.11964424

which was why I had to add that customization to begin with..  hmm
« Last Edit: 11/23/04 at 11:43:06 by Tony » Logged

----------------
http://www.astphotos.com
Tony
Gold Dragon
****

Gender: male
Posts: 85



Hello?  Where am I?
   

WWW
Re: Regarding Default Home page
« Reply #5 on: 11/23/04 at 12:06:04 »
Reply with quote Modify message

That goes back to the problem I get with:

[Tue Nov 23 14:16:19 2004] [error] [client 4.36.205.234] malformed header from script. Bad header=<!-- www.astphotos.comtemplate: shop.cgi, referer: http://www.astphotos.com/store/shop.cgi/all_sweatshirts


in my error logs.

Anyway, i'm going to put it back to what was kinda working before since I"m taking off for a week now and in case anyone sees my shop from a search, I'd love for them to buy something

Thanks for looking Marty

Oh, if you think something on the server needs to be changed, I can have the person running my server do it.
Logged

----------------
http://www.astphotos.com
Tony
Gold Dragon
****

Gender: male
Posts: 85



Hello?  Where am I?
   

WWW
Re: Regarding Default Home page
« Reply #6 on: 11/24/04 at 08:57:58 »
Reply with quote Modify message

So let me start fresh.  I brought my shop.cgi file back to how it was first created, no updates that we did.

I saw your thread on how to embed this into php, but I thought I tried it and it didn't work for me, so for all my templates on my cpadmin.cgi, I use the URL instead of the file name so that the PHP is processed:

astphotos.com/mytemplate.php for instance.  For the most part, this was working until it was printing the "content-type: html" or whatever it was.  then we did that hack (above) and it worked, but then the problem was that that redirect was not working.  

If I try to fix the redirect, I get my malformed headers again, but I do notice I only get them when there is a query string in the URL.  so the ones where I have my filter going, like
astphotos.com/store/shop.cgi/all_sweatshirts

works fine, until I click a product, which has a string, and then I get the malformed header.

Now, what do you think my best path is for this?  Should I try and go through the embed into php again, is that the problem? or am I missing something else.  The error log shows above what happened.

I do notice that all my pages, even when they are working, include random comment tags, like the error lists, but even blank ones like
<!-- -->  <!-- --> <center>
I guess I can check my premium store to see if maybe it's grabbing it from there?

Anyway, I hope this provides more information about my setup so that maybe we can figure this thing out.  Thanks...
« Last Edit: 11/24/04 at 08:59:06 by Tony » Logged

----------------
http://www.astphotos.com
Tony
Gold Dragon
****

Gender: male
Posts: 85



Hello?  Where am I?
   

WWW
Re: Regarding Default Home page
« Reply #7 on: 12/01/04 at 09:24:53 »
Reply with quote Modify message

Marty, I'm back in town and will try to play with this more, not sure if you've taken a look.  Does that error log entry help at all?

I'll see if I can figure out something
Logged

----------------
http://www.astphotos.com
Marty
Administrator Dragon
*****

Gender: male
Posts: a whole lot



That's me. :)
   

WWW E-Mail
Re: Regarding Default Home page
« Reply #8 on: 12/02/04 at 00:45:35 »
Reply with quote Modify message

I wonder if it has something to do with the arguments clause in cpshop.cgi.  Clearly your server is configured uniquely, otherwise you wouldn't be having this decidedly odd problem.

I wonder if your server is automatically interpreting query string variables as command-line arguments.  If that were the case, it would cause the @ARGV line in cpshop.cgi to fail, thereby muting the content-type line.

If you're not using a php wrapper, you could try removing the $| hack, and try commenting out the "unless (@ARVG)" lines:

#unless (@ARGV) {
   print "Content-Type: text/html\n\n";
#}

See what that accomplishes.
Logged

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

Gender: male
Posts: 85



Hello?  Where am I?
   

WWW
Re: Regarding Default Home page
« Reply #9 on: 12/02/04 at 06:46:50 »
Reply with quote Modify message

Wow, that worked Marty.  I finally am able to get the product page to come up now.  I'll see what is going on as far as how the server is processing stuff.  It's a server a few of us run, but I'm definitely not the admin for, so it's easy for me to find out how and why we are set up a certain way.  

Thanks again for taking a look.  I'm very impressed that you manage to come back here so often while working away at CP!
Logged

----------------
http://www.astphotos.com
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.