Kryptronic Software Support Forum

You are viewing this forum as a guest. Login to an existing account, or create a new account, to reply to topics and to create new topics.

#1 12-02-2007 20:01:42

Perkster
Member
From: Parksville BC Canada
Registered: 10-05-2004
Posts: 349
Website

SEO Concerns

Hello,

Still setting up site at http://www.linuxcdshop.com/index.php

I am slowly trying to rid the urls of any reference other than what is specific to my site.

I have managed to get rid of the ref to KHXCseo.html  It was a simple task.  Go to your KHXC_Display.php file and search for "KHXCseo" and there are 3 references to this.  I just replaced it with the word "index".

Now....

I am try to rid myself of the other references like:

ccp0-prodspec
ccp0-prodnew
ccp0-prodbest
ccp0-prodsearch
ccp0-prodall
ccp0-prodidx

I would also like to get rid ofthese references:

ccp0-catshow
ccp0-prodshow

If anyone can help point me to correct files and so on that would be much appreciated.

Mainly I want to remove ccp0 - part of the above and rename


Mike Perks
Linux CD Shop - /shop for Linux distributions

ReviewLinux.Com - Linux OS News & Review Site

Offline

 

#2 12-03-2007 01:18:27

Perkster
Member
From: Parksville BC Canada
Registered: 10-05-2004
Posts: 349
Website

Re: SEO Concerns

Update: IGNORE THIS POST SEE POST BELOW

Was able to remove the ccp0 from all urls when using SEO = TRUE.

In KHXC_Display.php on line 1003 you'll see :

$href_url .= $app . '-' . $ns . '/' . $ref . '.html';

I replaced mine like this as I sell I product called Linux:

$href_url .= 'linux' . '-' . $ns . '/' . $ref . '.html';

Now urls look like this

http://www.linuxcdshop.com/linux-catshow/bundle.html
http://www.linuxcdshop.com/linux-prodsh … ledvd.html

Just want to make other url's more unique..  If you know how,  tell me.. smile

Last edited by Perkster (12-03-2007 02:16:16)


Mike Perks
Linux CD Shop - /shop for Linux distributions

ReviewLinux.Com - Linux OS News & Review Site

Offline

 

#3 12-03-2007 02:09:37

Perkster
Member
From: Parksville BC Canada
Registered: 10-05-2004
Posts: 349
Website

Re: SEO Concerns

UPDATE:

What I am talking about here is changing url's  Now if this has been talked about please let me know and point me to exactly where it is mentioned in forum.

I went one further. 

In KHXC_Display.php on line 1003 you'll see :

$href_url .= $app . '-' . $ns . '/' . $ref . '.html';

Ignore my above post,  now it is:

$href_url .= $ns . '/' . $ref . '.html';

I then added a whole bunch of rewrite tules to my .htaccess file.  Here is what it looks like.  Now you may have more pages so you may have to tweak your .htaccess a little more.  I am also doing this on a non production server and I dont care if I get 404 errors while testing

Here is my .htaccess file:

Options +FollowSymLinks
RewriteEngine on

# New Rules
RewriteRule ^catshow/(.*)\.html index.php?app=ccp0&ns=catshow&ref=$1 [L,PT]
RewriteRule ^prodshow/(.*)\.html index.php?app=ccp0&ns=prodshow&ref=$1 [L,PT]
RewriteRule ^display/(.*)\.html index.php?app=ccp0&ns=display&ref=$1 [L,PT]
RewriteRule ^viewcart/(.*)\.html index.php?app=ccp0&ns=viewcart&ref=$1 [L,PT]
RewriteRule ^contact/(.*)\.html index.php?app=ccp0&ns=contact&ref=$1 [L,PT]
RewriteRule ^prodidx/(.*)\.html index.php?app=ccp0&ns=prodidx&ref=$1 [L,PT]
RewriteRule ^prodall/(.*)\.html index.php?app=ccp0&ns=prodall&ref=$1 [L,PT]
RewriteRule ^prodsearch/(.*)\.html index.php?app=ccp0&ns=prodsearch&ref=$1 [L,PT]
RewriteRule ^prodbest/(.*)\.html index.php?app=ccp0&ns=prodbest&ref=$1 [L,PT]
RewriteRule ^prodnew/(.*)\.html index.php?app=ccp0&ns=prodnew&ref=$1 [L,PT]
RewriteRule ^prodspec/(.*)\.html index.php?app=ccp0&ns=prodspec&ref=$1 [L,PT]
RewriteRule ^deletecart/(.*)\.html index.php?app=ccp0&ns=deletecart&ref=$1 [L,PT]
RewriteRule ^dynform/(.*)\.html index.php?app=ccp0&ns=dynform&ref=$1 [L,PT]
RewriteRule ^splash/(.*)\.html index.php?app=ccp0&ns=splash&ref=$1 [L,PT]

# Old Rule
# RewriteRule ^(.*)-(.*)/(.*)\.html index.php?app=$1&ns=$2&ref=$3 [L,PT]


Links now like:

http://www.linuxcdshop.com/display/splash.html
http://www.linuxcdshop.com/prodshow/gos101.html

Now the above seems to work so far for me but I havent finished all testing.  Try at your own risk...  Always backup or comment out old code.

Now all I want to do it change the catshow and prodshow references.  If anyone knows that please let me know..

Last edited by Perkster (12-03-2007 02:23:10)


Mike Perks
Linux CD Shop - /shop for Linux distributions

ReviewLinux.Com - Linux OS News & Review Site

Offline

 

#4 12-03-2007 02:46:02

Perkster
Member
From: Parksville BC Canada
Registered: 10-05-2004
Posts: 349
Website

Re: SEO Concerns

UPDATE.

Found Nick's post from July:

https://forum.kryptronic.com/viewtopic.php?id=17589

This helped alot.

My code added In KHXC_Display.php :

$href_url = preg_replace('/catshow/','distro',$href_url);
$href_url = preg_replace('/prodshow/','linux',$href_url);

My new .htaccess:

Options +FollowSymLinks
RewriteEngine on
RewriteRule ^distro/(.*)\.html index.php?app=ccp0&ns=catshow&ref=$1 [L,PT]
RewriteRule ^linux/(.*)\.html index.php?app=ccp0&ns=prodshow&ref=$1 [L,PT]
RewriteRule ^display/(.*)\.html index.php?app=ccp0&ns=display&ref=$1 [L,PT]
RewriteRule ^viewcart/(.*)\.html index.php?app=ccp0&ns=viewcart&ref=$1 [L,PT]
RewriteRule ^contact/(.*)\.html index.php?app=ccp0&ns=contact&ref=$1 [L,PT]
RewriteRule ^prodidx/(.*)\.html index.php?app=ccp0&ns=prodidx&ref=$1 [L,PT]
RewriteRule ^prodall/(.*)\.html index.php?app=ccp0&ns=prodall&ref=$1 [L,PT]
RewriteRule ^prodsearch/(.*)\.html index.php?app=ccp0&ns=prodsearch&ref=$1 [L,PT]
RewriteRule ^prodbest/(.*)\.html index.php?app=ccp0&ns=prodbest&ref=$1 [L,PT]
RewriteRule ^prodnew/(.*)\.html index.php?app=ccp0&ns=prodnew&ref=$1 [L,PT]
RewriteRule ^prodspec/(.*)\.html index.php?app=ccp0&ns=prodspec&ref=$1 [L,PT]
RewriteRule ^deletecart/(.*)\.html index.php?app=ccp0&ns=deletecart&ref=$1 [L,PT]
RewriteRule ^dynform/(.*)\.html index.php?app=ccp0&ns=dynform&ref=$1 [L,PT]
RewriteRule ^splash/(.*)\.html index.php?app=ccp0&ns=splash&ref=$1 [L,PT]
# RewriteRule ^(.*)-(.*)/(.*)\.html index.php?app=$1&ns=$2&ref=$3 [L,PT]

Hope this helps.


Mike Perks
Linux CD Shop - /shop for Linux distributions

ReviewLinux.Com - Linux OS News & Review Site

Offline

 

#5 01-18-2008 17:43:19

theblade24
Member
From: Tampa, Florida
Registered: 11-19-2003
Posts: 384
Website

Re: SEO Concerns

Is it possible to remove that directory completely?

So url would be http://www.linuxcdshop.com/gos101.html

Last edited by theblade24 (01-18-2008 17:43:40)


CCP 5.1
CCP 5.1
CCP 5.1

Offline

 

#6 01-18-2008 18:00:27

Perkster
Member
From: Parksville BC Canada
Registered: 10-05-2004
Posts: 349
Website

Re: SEO Concerns

Not sure I have not tested that config


Mike Perks
Linux CD Shop - /shop for Linux distributions

ReviewLinux.Com - Linux OS News & Review Site

Offline

 

#7 02-24-2008 12:32:05

Dave
Member
Registered: 07-05-2003
Posts: 11233

Re: SEO Concerns

theblade24 wrote:

Is it possible to remove that directory completely?

So url would be http://www.linuxcdshop.com/gos101.html

You would have to have a rewrite rule for every single product in your store if you did that.  The directory in the SEO URLs is the only trigger to the rules to get the real URL built correctly.

Offline

 

#8 02-24-2008 15:55:32

Dave
Member
Registered: 07-05-2003
Posts: 11233

Re: SEO Concerns

Call me crazy but I was working on a site today and thought to myself, self, why can't we have very specific URLs without any extra subdirectory names in the URLs?  What I ended up with was a very specific set of URLs that all look like HTML pages directly in the root of the site.  It took changes to KHXC_Display.php and .htaccess but I think it ended up looking a lot cleaner and, in the end, will help SEO.

In KHXC_Display inserted AFTER line 997 which reads:

Code:

$href_url .= $app . '-' . $ns . '/' . $ref . '.html';

The following was added:

Code:

     $href_url = preg_replace('/' . $app . '-catshow/','Category',$href_url);
     $href_url = preg_replace('/' . $app . '-prodshow/','Product',$href_url);
     $href_url = preg_replace('/' . $app . '-display/','Reference',$href_url);
     $href_url = preg_replace('/' . $app . '-prodspec\/KHXCseo.html/','Store_Specials.html',$href_url);
     $href_url = preg_replace('/' . $app . '-prodnew\/KHXCseo.html/','New_Products.html',$href_url);
     $href_url = preg_replace('/' . $app . '-prodall\/KHXCseo.html/','View_All_Products.html',$href_url);
     $href_url = preg_replace('/' . $app . '-prodidx\/KHXCseo.html/','Product_Index.html',$href_url);
     $href_url = preg_replace('/' . $app . '-prodbest\/KHXCseo.html/','Best_Sellers.html',$href_url);
     $href_url = preg_replace('/' . $app . '-prodsearch\/KHXCseo.html/','Advanced_Product_Search.html',$href_url);
     $href_url = preg_replace('/' . $app . '-contact\/KHXCseo.html/','Contact_Us.html',$href_url);
     $href_url = preg_replace('/' . $app . '-viewcart\/KHXCseo.html/','View_Shopping_Cart.html',$href_url);

In the .htaccess file BEFORE the existing rewrite rule used to facilitate SEO which reads:

Code:

RewriteRule ^(.*)-(.*)/(.*)\.html         index.php?app=$1&ns=$2&ref=$3         [L,PT]

The following was added:

Code:

        RewriteRule ^Category/(.*)\.html          index.php?app=ccp0&ns=catshow&ref=$1  [L,PT]
        RewriteRule ^Product/(.*)\.html           index.php?app=ccp0&ns=prodshow&ref=$1 [L,PT]
        RewriteRule ^Reference/(.*)\.html         index.php?app=ccp0&ns=display&ref=$1  [L,PT]
        RewriteRule ^Store_Specials.html          index.php?app=ccp0&ns=prodspec        [L,PT]
        RewriteRule ^New_Products.html            index.php?app=ccp0&ns=prodnew         [L,PT]
        RewriteRule ^View_All_Products.html       index.php?app=ccp0&ns=prodall         [L,PT]
        RewriteRule ^Product_Index.html           index.php?app=ccp0&ns=prodidx         [L,PT]
        RewriteRule ^Best_Sellers.html            index.php?app=ccp0&ns=prodbest        [L,PT]
        RewriteRule ^Advanced_Product_Search.html index.php?app=ccp0&ns=prodsearch      [L,PT]
        RewriteRule ^Contact_Us.html              index.php?app=ccp0&ns=contact         [L,PT]
        RewriteRule ^View_Shopping_Cart.html      index.php?app=ccp0&ns=viewcart        [L,PT]

The complete .htaccess with the new rules added looks like this:

Code:

        Options +FollowSymLinks
        RewriteEngine On
        RewriteRule ^Category/(.*)\.html          index.php?app=ccp0&ns=catshow&ref=$1  [L,PT]
        RewriteRule ^Product/(.*)\.html           index.php?app=ccp0&ns=prodshow&ref=$1 [L,PT]
        RewriteRule ^Reference/(.*)\.html         index.php?app=ccp0&ns=display&ref=$1  [L,PT]
        RewriteRule ^Store_Specials.html          index.php?app=ccp0&ns=prodspec        [L,PT]
        RewriteRule ^New_Products.html            index.php?app=ccp0&ns=prodnew         [L,PT]
        RewriteRule ^View_All_Products.html       index.php?app=ccp0&ns=prodall         [L,PT]
        RewriteRule ^Product_Index.html           index.php?app=ccp0&ns=prodidx         [L,PT]
        RewriteRule ^Best_Sellers.html            index.php?app=ccp0&ns=prodbest        [L,PT]
        RewriteRule ^Advanced_Product_Search.html index.php?app=ccp0&ns=prodsearch      [L,PT]
        RewriteRule ^Contact_Us.html              index.php?app=ccp0&ns=contact         [L,PT]
        RewriteRule ^View_Shopping_Cart.html      index.php?app=ccp0&ns=viewcart        [L,PT]
        RewriteRule ^(.*)-(.*)/(.*)\.html         index.php?app=$1&ns=$2&ref=$3         [L,PT]

Obviously the use of Category for categories and Product for products as well as any of the other names is easily changed by updating both KHXC_Display and the corresponding .htaccess rules.  What all this is does is create simple HTML looking URLs.  For example, specials now looks like this

http://www.yourdomain.com/Store_Specials.html

New products looks like

http://www.yourdomain.com/New_Products.html

etc etc ... hopefully somebody will find this useful smile

Offline

 

#9 02-24-2008 16:05:41

Perkster
Member
From: Parksville BC Canada
Registered: 10-05-2004
Posts: 349
Website

Re: SEO Concerns

Nice read Dave!


Mike Perks
Linux CD Shop - /shop for Linux distributions

ReviewLinux.Com - Linux OS News & Review Site

Offline

 

#10 03-12-2008 16:30:43

FrankJAG
Member
From: Texas
Registered: 03-03-2007
Posts: 179
Website

Re: SEO Concerns

Hi Dave,
Sorry for the silly question, where can I find KHXC_Display ?
Cheers,

Frank

Offline

 

#11 03-12-2008 16:32:19

Dave
Member
Registered: 07-05-2003
Posts: 11233

Re: SEO Concerns

{private}/core/KHXC_Display

Offline

 

#12 03-12-2008 16:48:29

FrankJAG
Member
From: Texas
Registered: 03-03-2007
Posts: 179
Website

Re: SEO Concerns

You ARE THE MAN Dave!
Thanks a million Brother, it finally works!! Woo Hoo!!
FTP----->Beer ;-)

Offline

 

#13 03-12-2008 19:02:27

wyattea
Member
Registered: 01-07-2006
Posts: 1650

Re: SEO Concerns

Dave, I'm currently setting up my cart under <mydomain>.com/khxc/.  The root of my site is actually live and taking orders.  Can I do the following:

incorporate all changes in your post above with /khxc/ in front of any url you referenced and make the .htaccess file changes to the .htaccess file under /khxc/?

Basically, I want to turn on SEO while I'm still setting up the site, without affecting my working site.  When ready to go live, do I just move the .htaccess file to the root?

Your thoughts?

James...

Offline

 

#14 03-12-2008 22:36:02

Dave
Member
Registered: 07-05-2003
Posts: 11233

Re: SEO Concerns

wyattea wrote:

incorporate all changes in your post above with /khxc/ in front of any url you referenced and make the .htaccess file changes to the .htaccess file under /khxc/?

If you have basic SEO working already then yes, you should be able to incorporate the changes adding the additional directory path to the URL.

wyattea wrote:

When ready to go live, do I just move the .htaccess file to the root?

Are you going to move CCP to the root also?  If you aren't how do you plan to get people down into the khxc directory?

Offline

 

#15 03-12-2008 22:52:23

wyattea
Member
Registered: 01-07-2006
Posts: 1650

Re: SEO Concerns

I don't have SEO setup right now.  Never turned it on since I'm not live, didn't bother yet.  I have the site under .com/khxc/ - so I'll have to just move all files to the root? I thought I could have it under the /khxc/ subdir and use .htaccess in the root to point to that subdir, but use rewrite rules to hide /khxc/ from being seen.  Guess not?

James...

Offline

 

#16 03-12-2008 23:03:02

Dave
Member
Registered: 07-05-2003
Posts: 11233

Re: SEO Concerns

I'd turn it on with the basics to make sure it's working before you dive in any further.  I believe you could leave it in khxc and redirect but I've seen folks here in the fora say that doing that isn't good for SEO (I don't personally know if it is or isn't).  I'm fairly certain that you'd still end up with the khxc in the path though.

Moving it to the root should be as simple as moving index.php and the other 4 public files to the root and running the installer to update the paths and cookie settings.

Offline

 

#17 03-13-2008 06:42:40

wyattea
Member
Registered: 01-07-2006
Posts: 1650

Re: SEO Concerns

Ok, got it working...what about this url: .../ccp0-viewcart/KHXCseo.php, can it be edited or did you omit for a reason?

Can we remove the /Category/ and /Product/ directories? I thought I read that somewhere but I could be wrong?

Thanks!

James...

Last edited by wyattea (03-13-2008 06:56:06)

Offline

 

#18 03-13-2008 06:52:47

Dave
Member
Registered: 07-05-2003
Posts: 11233

Re: SEO Concerns

.htaccess has to be in the root of the site not in khxc (sorry I didn't catch that and mention it in the previous post).

Offline

 

#19 03-13-2008 06:58:40

wyattea
Member
Registered: 01-07-2006
Posts: 1650

Re: SEO Concerns

well, I don't want it in the root, since I'm not running the site from the root right now (my live site is there).  So i put it in /khxc/ and it's working fine.  Anything wrong with that?

James...

Offline

 

#20 03-13-2008 07:01:06

wyattea
Member
Registered: 01-07-2006
Posts: 1650

Re: SEO Concerns

with 5.1, I have <domain>/c-Valentine-Gift-Baskets-vdaygb.php for categories and <domain>/i-Friendship-Bears-Fruit-FB461.php for products.  No categories, just c- and i- for categories and items.  Can this be done with 6.0?

James...

Offline

 

#21 03-13-2008 07:13:05

Dave
Member
Registered: 07-05-2003
Posts: 11233

Re: SEO Concerns

wyattea wrote:

well, I don't want it in the root, since I'm not running the site from the root right now (my live site is there).  So i put it in /khxc/ and it's working fine.  Anything wrong with that?

It won't work if it's in a lower level directory.

Offline

 

#22 03-13-2008 07:14:37

Dave
Member
Registered: 07-05-2003
Posts: 11233

Re: SEO Concerns

wyattea wrote:

with 5.1, I have <domain>/c-Valentine-Gift-Baskets-vdaygb.php for categories and <domain>/i-Friendship-Bears-Fruit-FB461.php for products.  No categories, just c- and i- for categories and items.  Can this be done with 6.0?

That's what my post 8 in this thread was all about James.  But you'll want your store running in the root of the site to make your life easier (could probably get away with having it in khxc but I haven't tried that).

Offline

 

#23 03-13-2008 07:36:22

wyattea
Member
Registered: 01-07-2006
Posts: 1650

Re: SEO Concerns

Dave, it's NOT live yet, I don't want people going to the root and seeing the site.  It's it /khxc/ while I work on it.  I'll move the files to the root when it's ready to go live and re-run the installer to change the dirs.

I did exactly what you posted in #8.  Your code creates the /Reference/, /Category/ and /Product/ directories.  It only removes dirs for the other pages (Specials, Best Sellers, etc.).  How do I get rid of /Reference/, /Category/ and /Product/ completely?

Offline

 

#24 03-13-2008 07:41:38

wyattea
Member
Registered: 01-07-2006
Posts: 1650

Re: SEO Concerns

I looked at the rewrite rule from 5.1, and it uses this:

RewriteRule p-(.*)\.php index.php?app=ccp0&ns=prodshow&ref=$1 [L,PT]

But changing it to that didn't work - you have a ^ in front of the rule, I don't know what that does.

Any thoughts?

James...

Offline

 

#25 03-13-2008 08:15:05

Dave
Member
Registered: 07-05-2003
Posts: 11233

Re: SEO Concerns

wyattea wrote:

Dave, it's NOT live yet, I don't want people going to the root and seeing the site.

Having .htaccess in the root won't make people going to the site see the store unless you specifically add an additional rule to send them there.

wyattea wrote:

I did exactly what you posted in #8.  Your code creates the /Reference/, /Category/ and /Product/ directories.  It only removes dirs for the other pages (Specials, Best Sellers, etc.).  How do I get rid of /Reference/, /Category/ and /Product/ completely?

You can't really without creating a rule for every single product, category and HTML page.  There has to be a "break point" in the URL to allow the rules to work.  The rules work because what type of page is being requested can be determined by the URL.  Simply using a x- won't allow that detection to work.

Offline

 

Board footer