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

YOU ARE HERE:
Directories, Editable?

HOME

CPSHOP|

|

|

EMAIL MARTY
  marty.net message board
  « Directories, Editable? »
Welcome, Guest. Please Login or Register.
12/17/17 at 12:03:32
Home Help Search Login Register
   marty.net message board
   About cpshop
   Customization Help
   Directories, Editable?
(Moderator: Marty)
Pages: 1 Reply Notify of replies Send the topic Print 
   Author  Topic: Directories, Editable?  (Read 1420 times)
stevrons
Silver Dragon
***

Posts: 28



Go Scots!
   

E-Mail
Directories, Editable?
« on: 09/21/07 at 12:40:07 »
Reply with quote Modify message

Marty or anyone,
 The way my CPShop is set up now all my pages, other than my homepage, have a very long url "www.mywebsite.com/cgi-bin/store/cpshop.cgi..........". Now I want to make it so that I can have some more simple directories, so for instance I'd like to have www.mywebsite.com/sports, and then when the visitor visits that particular url the script runs and they see sports related t-shirts. Is this possible? Could the script run on that exact page, www.mywebsite.com/sports, or would there have to be a link to a page that actually ran the script, where the url would be a huge string of characters like it is now?

I know that search engines definitely give some weight to the text in your urls, when you do a search a lot of times you'll not only see your search words highlighted in each of the results that comes up, but also the search terms that occur in the URL of the result pages is also highlighted, which tells me the engines take that into account.

any ideas on how I can accomplish running a script on a particular page, without having the URL of that page be huge?

Logged
stevrons
Silver Dragon
***

Posts: 28



Go Scots!
   

E-Mail
Re: Directories, Editable?
« Reply #1 on: 09/21/07 at 12:41:24 »
Reply with quote Modify message

just wanted to clarify, when I said "any ideas on how to run A script on a page without having the URL be so long"  I meant the CPShop script, not just any old script.
Logged
Redi_Jedi
Green Dragon
*

Posts: 5



Go Scots!
   

Re: Directories, Editable?
« Reply #2 on: 09/21/07 at 16:21:55 »
Reply with quote Modify message

Theres quite a few ways to do that, depending on your setup.
If you only have cpshop on that domain, and no other content then you'll want this page:
http://www.marty.net/go2/site/view/marty/152

If your trying to make cpshop a page in a larger website then basically just include the file in the page where you want the store, and pass the qurey strings to it.  there a thread in the tutorials section that shows how to do it in php.
Logged
brattytees
Gold Dragon
****

Posts: 439



ack!
   

Re: Directories, Editable?
« Reply #3 on: 09/22/07 at 07:22:05 »
Reply with quote Modify message

Or you can use mod_rewrite in an htaccess file, depending upon your comfort level with stuff like that...

Be careful of duplicate content however you do it. You may - or may not - need to use 301 redirects to keep the search engines happy, especially google. You don't want two different url's - from your site - pointing to the same page.

EDIT- wow, I sure messed that up. I knew what I meant, but it sure didn't translate from my brain to my fingers... I meant to write that you don't want google seeing the exact same content at two different url's on your site.

If you have a page at blah/blah/cgi-bin/cpshop.cgi and rewrite it to blah/my_new_page.htm you now - may -  have duplicate content. You would want to redirect the first url to the second using a 301 in your htaccess file.

Hope that makes sense.
« Last Edit: 09/22/07 at 13:27:28 by brattytees » Logged
Hex Angel - Patrick
Gold Dragon
****

Posts: 500



Our nature lies in movement; complete calm is death.
   

WWW
Re: Directories, Editable?
« Reply #4 on: 09/22/07 at 09:48:38 »
Reply with quote Modify message

For those on Apache servers there is another option in addition to Marty's methods... MOD_REWRITE. These are directives in your .htaccess file that take the URL requested by a user's browser and, well, rewrite it so that it is transparently translated to a target URL.  

It's syntax is somewhat arcane to the uninitiated, but MOD_REWRITE is a very powerful tool.  

p.
Logged

CPSHOP
www.PeaceAndLoveShop.com Namaste
BLOG
www.TheNomadicSpirit.com Inspired by travel
www.GodBeautyPerfectionLove.com Inspired by spirit
www.MyMuseMoviesMusicAndBooks.com Inspired by the arts
brattytees
Gold Dragon
****

Posts: 439



ack!
   

Re: Directories, Editable?
« Reply #5 on: 09/22/07 at 13:25:41 »
Reply with quote Modify message


Quote:
It's syntax is somewhat arcane to the uninitiated
to put it mildly...
Logged
Hex Angel - Patrick
Gold Dragon
****

Posts: 500



Our nature lies in movement; complete calm is death.
   

WWW
Re: Directories, Editable?
« Reply #6 on: 09/22/07 at 14:18:54 »
Reply with quote Modify message



on 09/22/07 at 07:22:05, BrattyTees wrote:
Be careful of duplicate content however you do it. You may - or may not - need to use 301 redirects to keep the search engines happy, especially google. You don't want two different url's - from your site - pointing to the same page.


I believe you can use the cpshop image file to remove the "cgi-bin/store.cgi" portion of most if not all links generated by cpshop. Then your links from cpshop pages won't need to be redirected. (I use my own add-on software to do this.)

p.
Logged

CPSHOP
www.PeaceAndLoveShop.com Namaste
BLOG
www.TheNomadicSpirit.com Inspired by travel
www.GodBeautyPerfectionLove.com Inspired by spirit
www.MyMuseMoviesMusicAndBooks.com Inspired by the arts
stevrons
Silver Dragon
***

Posts: 28



Go Scots!
   

E-Mail
Re: Directories, Editable?
« Reply #7 on: 09/22/07 at 18:03:14 »
Reply with quote Modify message

Thanks for all the response.

So I can create an htaccess file and basically redirect all my current url's to the url's I want them to be, I'll look into that.

HEx you said 'you can use the cpshop 'cgi image file' to remove the "cgi-bin/store.cgi" portion of the url, but that would just leave you with a shorter version of the current url correct? That won't help in changing the url to something more related to the site.  ie.  www.mywebsite.com/sports

rather than www.mywebsite.com/3343102

and you mentioned you use sofware to do that for you, may I ask what you use?
Logged
Hex Angel - Patrick
Gold Dragon
****

Posts: 500



Our nature lies in movement; complete calm is death.
   

WWW
Re: Directories, Editable?
« Reply #8 on: 09/22/07 at 18:44:45 »
Reply with quote Modify message

Steve,


Quote:
HEx you said 'you can use the cpshop 'cgi image file' to remove the "cgi-bin/store.cgi" portion of the url, but that would just leave you with a shorter version of the current url correct? That won't help in changing the url to something more related to the site.  ie.  www.mywebsite.com/sports


Yep.  But that's kinda what you want.  EG:

Right now you might have links in your cpshop that read

www.mywebsite.com/cgi-bin/store.cgi/sports

So you setup a rule in the cp image file to remove all occurrences of  

 "/cgi-bin/store.cgi"

Now all your links in your pages (at least the ones you can change via the image file) will read

www.mywebsite.com/sports


Now in your .htaccess file you MOD_REWRITE any inbound links that look like

www.mywebsite.com/(wildcard)

to

www.mywebsite.com/cgi-bin/store.cgi/(wildcard)


If a user types in either form they'll still get to the right cpshop page.  However, when SE spiders go through your cpshop they won't see any links with the cgi-bin/store.cgi portion.

p.
Logged

CPSHOP
www.PeaceAndLoveShop.com Namaste
BLOG
www.TheNomadicSpirit.com Inspired by travel
www.GodBeautyPerfectionLove.com Inspired by spirit
www.MyMuseMoviesMusicAndBooks.com Inspired by the arts
Hex Angel - Patrick
Gold Dragon
****

Posts: 500



Our nature lies in movement; complete calm is death.
   

WWW
Re: Directories, Editable?
« Reply #9 on: 09/22/07 at 18:48:01 »
Reply with quote Modify message



on 09/22/07 at 18:03:14, stevrons wrote:
and you mentioned you use sofware to do that for you, may I ask what you use?


Something I call cpdig. I've written a tutorial here describing how to use it for advanced string replacement:
http://www.marty.net/cgi/marty/board/messageboard?board=tutorials&action=display&num=1175036828

p.
Logged

CPSHOP
www.PeaceAndLoveShop.com Namaste
BLOG
www.TheNomadicSpirit.com Inspired by travel
www.GodBeautyPerfectionLove.com Inspired by spirit
www.MyMuseMoviesMusicAndBooks.com Inspired by the arts
brattytees
Gold Dragon
****

Posts: 439



ack!
   

Re: Directories, Editable?
« Reply #10 on: 09/23/07 at 06:20:42 »
Reply with quote Modify message


Quote:
Now in your .htaccess file you MOD_REWRITE any inbound links that look like

www.mywebsite.com/(wildcard)

to

www.mywebsite.com/cgi-bin/store.cgi/(wildcard)


If a user types in either form they'll still get to the right cpshop page.  However, when SE spiders go through your cpshop they won't see any links with the cgi-bin/store.cgi portion.

That's right, but the SE's still have all those old links in their databases, and (some) will continue to spider them (google), and find (duplicate)content there, even though they aren't on the pages anymore. That's why you need to 301 them. I guess the other thing you can do instead of 301's is to disallow the old links in your robots.txt file.

Not trying to scare you away from doing this, as I'm working toward it myself, but google especially frowns upon dup content and does reflect that in it's serps.
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.