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 09-23-2008 23:48:19

nlorntson
Member
Registered: 12-23-2007
Posts: 74

Editing the .htaccess fo the HD SEO XMOD

I have the normal SEO working for my site.  I've purchased and installed the HD SEO XMOD.  I have other URL forwarding in my .htaccess already so I added the

Code:

Options +FollowSymLinks

to the top of the file and made a single entry in the .htaccess file fo the category I am experimenting with:

Code:

RewriteRule ^ccp0-catshow/Shock\.html$ http://www.precisionframe.com/RV_Shock_Absorbers [L,R=permanent]
RewriteRule ^RV_Shock_Absorbers$ /ccp0-catshow/Shock.html
RewriteRule ^(.*)-(.*)/(.*)\.html store_pub/index.php?app=$1&ns=$2&ref=$3 [L,PT]

I have enabled the HD SEO XMOD

I have made a single entry in the URL database that has

Code:

/ccp0-catshow/Shock.html

for the Default SEO URL

and

Code:

/RV_Shock_Absorbers

in the High Definition SEO URL

I can see the new URL if I hover over the link, but clicking on the link gets me a 404 error.  Any ideas?

Offline

 

#2 09-24-2008 06:22:13

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

Re: Editing the .htaccess fo the HD SEO XMOD

If Options +FollowSymLinks wasn't already in your .htaccess file you didn't, and probably shouldn't, add it. I would give it another try after removing that line.  Whether or not the FollowSymLinks entry is needed or not depends on the hosting provider and their configuration of Apache.

Offline

 

#3 09-24-2008 07:35:57

nlorntson
Member
Registered: 12-23-2007
Posts: 74

Re: Editing the .htaccess fo the HD SEO XMOD

Thanks for the response Dave.

Options +FollowSymLinks was in my .htaccess file at the top.  I removed it and still no good.  I see the rewritten URL when I hover over the category, but clicking the link brings up the 404 page.

Any other ideas?

Offline

 

#4 09-24-2008 07:38:45

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

Re: Editing the .htaccess fo the HD SEO XMOD

I don't have any but I've asked our documentation guru Jeff to peek at this thread since he's had a lot more experience actually implementing HD SEO on his site.

Offline

 

#5 09-24-2008 22:24:42

nlorntson
Member
Registered: 12-23-2007
Posts: 74

Re: Editing the .htaccess fo the HD SEO XMOD

Thanks Dave.  I've spent most of the day on and off trying to get this HD SEO Xmod working.  I've read all the recent posts and tried all the suggestions I could understand.

Additional information that may or may not be useful is:

1.  The store is in a subdirectory of my main site (root) the sub-directory is store_pub so my index.php file is in the http://www.precisionframe.com/store_pub/index.php

2.  I do have other redirects in my .htaccess for files outside of my store subdirectores.  I have tried deleting those entries and getting down to just the following:

Code:

Options +FollowSymLinks
RewriteEngine on
RewriteRule ^ccp0-catshow/Shock\.html$ http://www.precisionframe.com/RV_Shock_Absorbers [L,R=permanent]
RewriteRule ^RV_Shock_Absorbers$ /ccp0-catshow/Shock.html
RewriteRule ^(.*)-(.*)/(.*)\.html store_pub/index.php?app=$1&ns=$2&ref=$3 [L,PT]

I also tried

Code:

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

for the last line.

3.  Both the SEO settings are set to TRUE  (Currently the HD SEO one is set to False so my site works)

4.  The entry in the SEO HD URL DB entry is       /ccp0-catshow/Shock.html   and   /RV_Shock_Absorbers   for the two fields respectively

5.  I had not previously had the default SEO turned on so I turned that on and got it working a week ago PRIOR to trying to get this new HD SEO working.  The instructions for the HD XMOD mention something on page 8: 

Note: If your web site is new and this is your first time with ClickCartPro, this is the only Rewrite Rule you’ll need to include:  RewriteRule ^Children’s-Bicycle-Parts$ /ccp0-catshow/kidbikeprts.html

so I intepreted this to be equivalent to

Code:

RewriteRule ^RV_Shock_Absorbers$ /ccp0-catshow/Shock.html

I did try using just his rule as is suggested.

I'm out of answers.  HELP  sad

Last edited by nlorntson (09-24-2008 22:37:19)

Offline

 

#6 09-25-2008 08:23:11

salesdesk
Member
Registered: 07-03-2008
Posts: 147

Re: Editing the .htaccess fo the HD SEO XMOD

Hi,

I looked at your code and compared it to mine that is working.

I'm not an engineer, but had a couple of things I noticed.

First, when I went into Firefox and pasted the address you had, it took me to the correct page and had the correct title of RV_Shock_Absorbers

One thing I did notice on your final line of code, you didn't have a "/" in front of store_pub...

Maybe?

Hope this helps.

Thanks,

Jeff

Offline

 

#7 09-25-2008 20:35:27

nlorntson
Member
Registered: 12-23-2007
Posts: 74

Re: Editing the .htaccess fo the HD SEO XMOD

Thanks for the look, Jeff.  The good news is your comment about pasting the URL into the browser pointed me in the right direction and things seem to be working now.

The missing "/" was not the problem, but as I mentioned, I had tried the last line both with and without the "/".

I started playing around with the URL a bit.  What I figured out is that because my sore is WITHIN my main site, I needed to include the store sub directory in the rewrite line.

I went from this:

Code:

RewriteRule ^RV_Shock_Absorbers$ /ccp0-catshow/Shock.html

to

Code:

RewriteRule ^store_pub/RV_Shock_Absorbers$ /ccp0-catshow/Shock.html

My URL entry in the db remains as

Code:

 /ccp0-catshow/Shock.html

and

Code:

/RV_Shock_Absorbers

I did not need the extra line in the .htaccess file of

Code:

RewriteRule ^ccp0-catshow/Shock\.html$ http://www.precisionframe.com/RV_Shock_Absorbers [L,R=permanent]

I believe I didn't need it because I had not had the default SEO turned on so the spiders have not had a chance to crawl my site since I have turned on.  Basically, that first line seems to be unecessary for my situation.  Now, the mad dash to get the rest of the URL's entered and the .htaccess updated.

Thanks for all the help.  Hopefully I'm on the way!

Last edited by nlorntson (09-25-2008 20:35:58)

Offline

 

#8 01-30-2009 16:10:06

CrownRoyal
Member
Registered: 01-10-2009
Posts: 677

Re: Editing the .htaccess fo the HD SEO XMOD

If I understand this SEO mod correctly, to set up a redirect, there are multiple steps: enter the page (and/or categories) XMOD: High Definition SEO: Manage URLs page and enter the lines of text in the htaccess file, then upload the htaccess file to the web site.

Have I missed anything? If that's correct, then it sounds fairly simple for a web site that has (or wants to) only redirect a couple of product categories of pages. But what if the store has over 3,000 items. That, my friends, is a daunting task if a store owner wants to SEO their store. After all, that's what the SEO XMOD was designed for.

Now if there's some trick that I've missed to being able to handle that many products, could someone point that out to me?

Thanks.

Last edited by CrownRoyal (01-30-2009 16:11:08)

Offline

 

#9 01-30-2009 18:49:30

CrownRoyal
Member
Registered: 01-10-2009
Posts: 677

Re: Editing the .htaccess fo the HD SEO XMOD

Another question on the SEO mod. Does this mod affect the functionality of the affiliate code tracking? Does changing http://www.yourweb.com/ccp0-catshow/kid … tsrc=af001 to http://www.yourweb.com/Childrens-Bicycl … tsrc=af001 still work?

Offline

 

#10 01-30-2009 21:35:14

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

Re: Editing the .htaccess fo the HD SEO XMOD

CrownRoyal wrote:

Another question on the SEO mod. Does this mod affect the functionality of the affiliate code tracking? Does changing http://www.yourweb.com/ccp0-catshow/kid … tsrc=af001 to http://www.yourweb.com/Childrens-Bicycl … tsrc=af001 still work?

The new format should work just fine.

Offline

 

#11 01-30-2009 22:23:58

CrownRoyal
Member
Registered: 01-10-2009
Posts: 677

Re: Editing the .htaccess fo the HD SEO XMOD

I wrote a php script for creating the two rewrite rule lines of code by pulling the required data from ccp_0 table. And, it insert the related id and url into the khxc_xmodhdseo table. My server does rewrite. My ccp is in a 'store' subfolder off of the root. I have this in the htaccess file

Code:

Options +FollowSymLinks
RewriteEngine on
RewriteRule ^ccp0-catshow/bldg\.html$ http://www.example.com/Building_Construction_Plans [L,R=permanent]
RewriteRule ^Building_Construction_Plans$ /ccp0-catshow/bldg.html

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

and in the khxc_xmodhdseo table I have $id = /ccp0-catshow/bldg.html and $url=/Building_Construction_Plans

I still get 404 errors.  What am I missing? I also tried it with this : RewriteRule ^store/(.*)-(.*)/(.*)\.html /store/index.php?app=$1&ns=$2&ref=$3 [L,PT] and I even removed the Options +FollowSymLinks as suggested earlier. I still get 404's.

Last edited by CrownRoyal (01-31-2009 06:27:43)

Offline

 

#12 01-30-2009 22:25:50

CrownRoyal
Member
Registered: 01-10-2009
Posts: 677

Re: Editing the .htaccess fo the HD SEO XMOD

Once I get it working properly I may post the script, so that other people who want to convert their categories, product pages etc can do so with a click of the mouse.

Offline

 

#13 01-31-2009 06:24:00

CrownRoyal
Member
Registered: 01-10-2009
Posts: 677

Re: Editing the .htaccess fo the HD SEO XMOD

I tried this:

Code:

Options +FollowSymLinks
RewriteEngine on
RewriteRule ^store/ccp0-catshow/bldg\.html$ http://www.example.com/Building_Construction_Plans [L,R=permanent]
RewriteRule ^store/Building_Construction_Plans$ /ccp0-catshow/bldg.html
RewriteRule ^store/(.*)-(.*)/(.*)\.html /store/index.php?app=$1&ns=$2&ref=$3 [L,PT]

and in the khxc_xmodhdseo table I have $id = /ccp0-catshow/bldg.html and $url=/Building_Construction_Plans

still getting 404's

Offline

 

#14 01-31-2009 07:24:35

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

Re: Editing the .htaccess fo the HD SEO XMOD

The first rewrite rule should be

Code:

RewriteRule ^store/ccp0-catshow/bldg\.html$ http://www.example.com/store/Building_Construction_Plans [L,R=permanent]

I believe since you have CCP installed in a sub-directory.

Offline

 

#15 01-31-2009 20:46:12

CrownRoyal
Member
Registered: 01-10-2009
Posts: 677

Re: Editing the .htaccess fo the HD SEO XMOD

Thanks Dave. That works. I knew it had to be something. Next I'll work on the script for renaming the products.

Offline

 

#16 02-03-2009 09:19:32

CrownRoyal
Member
Registered: 01-10-2009
Posts: 677

Re: Editing the .htaccess fo the HD SEO XMOD

Here is the php I made up for automatically generating the category and product names for the HD SEO mod. If its ok with you, I could post it to the thread or you could tag it as something useful to CCP owners. All a person has to do is copy the code and create a php page. Upload it to their site, and call it up in a browser. Then follow the instructions.

Code:

<?
echo"<p>First, to setup this page for specific tasks, add the respective string shown below in bold, to the end of the URL in your browser address line:<br>
<b>?action=renamecat</b> - to rename categories<br>
<b>?action=renameprod</b> - to rename your products<br>
Once added, click Go or Refresh or whatever...You will then be prompted to checkmark a box and submit. When you do submit, the code generated on this page should be copied and pasted to you htaccess file.</p> 
<p>Second...the following work is performed in the background for you. The appropiate 'id'and 'url' are automatically inserted into the khxc_xmodhdseo table in your sql database for you. This insertion step shortcuts the task that has to be performed at Hybrid X Core > XMODs: Extension Module Administration > XMOD: High Definition SEO: Manage URLs</p>
<p>Third, keep in mind that you paste the generated information between these lines of code in your htaccess file:<br>
Options +FollowSymLinks<br>
RewriteEngine on<br>
<font color='FF0000'>(...paste your results here...)</font><br>
RewriteRule ^store/(.*)-(.*)/(.*)\.html /store/index.php?app=$1&ns=$2&ref=$3 [L,PT]
<br>";

///////////////////////////////////////////////////////////////////////////////////////////////////////
// What Do You Change? - Look below for CHANGE WILL BE REQUIRED HERE and CHANGE MAY BE REQUIRED HERE //
///////////////////////////////////////////////////////////////////////////////////////////////////////

if ($action=="renamecat")
{
$sitenames = "Generate htaccess rewrite codes for CCP categories";

echo"<table><tr><td><form action='$PHP_SELF_ADMIN?action=categorygo' method ='post'><input type=checkbox name='activate' value='yes'> Check here to generate code for renaming categories. <input type = 'submit' value = 'Submit Setup' class='button1'></td></tr></table>";
exit;
}

if ($action=="categorygo")
{$sitenames = "Temp code activated";
//CHANGE WILL BE REQUIRED HERE, you may require different coding to connect to your db. Use it if it works in place of what I use below.
//Enter your required information to connect to your sql database
function dbConnect()
{
     $connect=mysql_connect( "ENTER  HOST NAME HERE", "ENTER USERNAME HERE", "ENTER PASSWORD HERE" ) or die ("Cannot make the connection. Check your settings.");
     mysql_select_db( "ENTER DATABASE NAME HERE",$connect );
}
dbConnect();

if ($activate=="yes")
{
$rime1 = mysql_query("SELECT id,name FROM ccp0_cat")or die(mysql_error());
echo "<font color='FF0000'>...here are your results for category names...<br></font>";
while($row=mysql_fetch_array($rime1))
{extract($row);
$oldcatname = $id;
//Start explode Display name of category then implode with an underscore "_"
$blowup = explode(" ", "$name");
$newcatname = implode("_", $blowup);
//End explode Display name of category then implode with an underscore "_"

//CHANGE MAY BE REQUIRED HERE...
//Start echo statement for two lines of rewrite to appear in browser. NOTE: First, replace example.com with your domain name. Second, you will see store/ which is because I setup my CCP in a subfolder called 'store'. If you called yours something else, change 'store' to your folder name. If you installed your CCP in your root folder, remove store/ (store and the forward slash) from the echo statement below.
echo "RewriteRule ^store/ccp0-catshow/$oldcatname\.html$ http://www.example.com/store/$newcatname [L,R=permanent]<br>
RewriteRule ^store/$newcatname"."$"." store/ccp0-catshow/".$oldcatname.".html<br>";
//End of print (echo statement)

//Start insertion to khxc_xmodhdseo table
$xmoddhseoid = "/ccp0-catshow/".$oldcatname.".html";
$xmoddhseourl = "/$newcatname";
$addtokhxc_xmodhdseo = mysql_query("INSERT into khxc_xmodhdseo VALUES ('$xmoddhseoid','$xmoddhseourl')");
//End insertion to khxc_xmodhdseo table
}}
exit;
}
///////////////////////////////////////////////////////////////////////////////////
if ($action=="renameprod")
{
echo"<table><tr><td><form action='$PHP_SELF_ADMIN?action=productsgo' method ='post'><input type=checkbox name='productactivate' value='yes'> Check here to generate code for renaming products. <input type = 'submit' value = 'Submit Setup' class='button1'></td></tr></table>";
exit;
}

if ($action=="productsgo")
{
//CHANGE WILL BE REQUIRED HERE
//Enter your required information to connect to your sql database
function dbConnect()
{
     $connect=mysql_connect( "ENTER  HOST NAME HERE", "ENTER USERNAME HERE", "ENTER PASSWORD HERE" ) or die ("Cannot make the connection. Check your settings.");
     mysql_select_db( "ENTER DATABASE NAME HERE",$connect );
}
dbConnect();

if ($productactivate=="yes")
{
$rime1 = mysql_query("SELECT id,name FROM ccp0_prod")or die(mysql_error());
echo "<font color='FF0000'>...here are your results for product names...<br></font>";
while($row=mysql_fetch_array($rime1))
{extract($row);
$oldprodname = $id;
//Start explode Product Name of category then implode with an underscore "_"
$blowup = explode(" ", "$name");
$newprodname = implode("_", $blowup);
//End explode Product name of category then implode with an underscore "_"

//CHANGE MAY BE REQUIRED HERE...
//Start echo statement for two lines of rewrite to appear in browser. NOTE: First, replace example.com with your domain name. Second, you will see store/ which is because I setup my CCP in a subfolder called 'store'. If you called yours something else, change 'store' to your folder name. If you installed your CCP in your root folder, remove store/ (store and the forward slash) from the echo statement below.
echo "RewriteRule ^store/ccp0-prodshow/$oldprodname\.html$ http://www.example.com/store/$newprodname [L,R=permanent]<br>
RewriteRule ^store/$newprodname"."$"." store/ccp0-prodshow/".$oldprodname.".html<br>";
//End of print (echo statement)

//Start insertion to khxc_xmodhdseo table
$xmoddhseoid = "/ccp0-prodshow/".$oldprodname.".html";
$xmoddhseourl = "/$newprodname";
$addtokhxc_xmodhdseo = mysql_query("INSERT into khxc_xmodhdseo VALUES ('$xmoddhseoid','$xmoddhseourl')");
//End insertion to khxc_xmodhdseo table
}
}
exit;
}
///////////////////////////////////////////////////////////////////////////////////

?>

Offline

 

#17 02-03-2009 09:28:56

CrownRoyal
Member
Registered: 01-10-2009
Posts: 677

Re: Editing the .htaccess fo the HD SEO XMOD

And here are the rewrites for a number of other pages in CCP. Of course, you can chose to rename them to whatever you want to improve your site specifics.

Code:

RewriteRule ^store/ccp0-display/splash\.html$ http://www.example.com/store/Home [L,R=permanent]
RewriteRule ^store/Home$ store/ccp0-display/splash.html

RewriteRule ^store/ccp0-display/storepolicies\.html$ http://www.example.com/store/Policy [L,R=permanent]
RewriteRule ^store/Policy$ store/ccp0-display/storepolicies.html

RewriteRule ^store/ccp0-display/termsofuse\.html$ http://www.example.com/store/Terms_of_Use [L,R=permanent]
RewriteRule ^store/Terms_of_Use$ store/ccp0-display/termsofuse.html

RewriteRule ^store/ccp0-display/privacy\.html$ http://www.example.com/store/Privacy [L,R=permanent]
RewriteRule ^store/Privacy$ store/ccp0-display/privacy.html

RewriteRule ^store/ccp0-display/affiliateinfo\.html$ http://www.example.com/store/Affiliate_Program [L,R=permanent]
RewriteRule ^store/Affiliate_Program$ store/ccp0-display/affiliateinfo.html

RewriteRule ^store/ccp0-display/feedbackpage\.html$ http://www.example.com/store/Customer_Reviews [L,R=permanent]
RewriteRule ^store/Customer_Reviews$ store/ccp0-display/feedbackpage.html

RewriteRule ^store/ccp0-splash/KHXCseo\.html$ http://www.example.com/store/Categories [L,R=permanent]
RewriteRule ^store/Categories$ store/ccp0-splash/KHXCseo.html

RewriteRule ^store/ccp0-viewcart/KHXCseo\.html$ http://www.example.com/store/Shopping_Cart [L,R=permanent]
RewriteRule ^store/Shopping_Cart$ store/ccp0-viewcart/KHXCseo.html

RewriteRule ^store/ccp0-prodsearch/KHXCseo\.html$ http://www.example.com/store/Search [L,R=permanent]
RewriteRule ^store/Search$ store/ccp0-prodsearch/KHXCseo.html

RewriteRule ^store/ccp0-prodall/KHXCseo\.html$ http://www.example.com/store/All_Products [L,R=permanent]
RewriteRule ^store/All_Products$ store/ccp0-prodall/KHXCseo.html

RewriteRule ^store/ccp0-prodidx/KHXCseo\.html$ http://www.example.com/store/Product_Index [L,R=permanent]
RewriteRule ^store/Product_Index$ store/ccp0-prodidx/KHXCseo.html

RewriteRule ^store/ccp0-prodspec/KHXCseo\.html$ http://www.example.com/store/Specials [L,R=permanent]
RewriteRule ^store/Specials$ store/ccp0-prodspec/KHXCseo.html

RewriteRule ^store/store/ccp0-prodbest/KHXCseo\.html$ http://www.example.com/store/Best_Sellers [L,R=permanent]
RewriteRule ^store/Best_Sellers$ store/ccp0-prodbest/KHXCseo.html

RewriteRule ^store/ccp0-prodnew/KHXCseo\.html$ http://www.example.com/store/New_Products [L,R=permanent]
RewriteRule ^store/New_Products$ store/ccp0-prodnew/KHXCseo.html

RewriteRule ^store/ccp0-contact/KHXCseo\.html$ http://www.example.com/store/Contact_Us [L,R=permanent]
RewriteRule ^store/Contact_Us$ store/ccp0-contact/KHXCseo.html

Offline

 

#18 02-03-2009 09:30:35

CrownRoyal
Member
Registered: 01-10-2009
Posts: 677

Re: Editing the .htaccess fo the HD SEO XMOD

So, there you have it. What took me about an hour to write up, produced rewrite rules for 2,700 products and categories in less than 10 seconds. All I had to do was paste the results to the htaccess file and it was all done. I'm sure there's room for improving the php code. I know just enough to be dangerous to myself. smile

Last edited by CrownRoyal (02-03-2009 09:31:27)

Offline

 

#19 02-03-2009 11:48:25

CrownRoyal
Member
Registered: 01-10-2009
Posts: 677

Re: Editing the .htaccess fo the HD SEO XMOD

Created another list of rewrites that apply to the A to Z Index pages. So this would get added to the htaccess file.
Make sure you change 'example' to your web site name.

RewriteRule ^store/ccp0-prodidx/A\.html$ http://www.example.com/store/Product_Index_A [L,R=permanent]
RewriteRule ^store/Product_Index_A$ store/ccp0-prodidx/A.html
RewriteRule ^store/ccp0-prodidx/B\.html$ http://www.example.com/store/Product_Index_B [L,R=permanent]
RewriteRule ^store/Product_Index_B$ store/ccp0-prodidx/B.html
RewriteRule ^store/ccp0-prodidx/C\.html$ http://www.example.com/store/Product_Index_C [L,R=permanent]
RewriteRule ^store/Product_Index_C$ store/ccp0-prodidx/C.html
RewriteRule ^store/ccp0-prodidx/D\.html$ http://www.example.com/store/Product_Index_D [L,R=permanent]
RewriteRule ^store/Product_Index_D$ store/ccp0-prodidx/D.html
RewriteRule ^store/ccp0-prodidx/E\.html$ http://www.example.com/store/Product_Index_E [L,R=permanent]
RewriteRule ^store/Product_Index_E$ store/ccp0-prodidx/E.html
RewriteRule ^store/ccp0-prodidx/F\.html$ http://www.example.com/store/Product_Index_F [L,R=permanent]
RewriteRule ^store/Product_Index_F$ store/ccp0-prodidx/F.html
RewriteRule ^store/ccp0-prodidx/G\.html$ http://www.example.com/store/Product_Index_G [L,R=permanent]
RewriteRule ^store/Product_Index_G$ store/ccp0-prodidx/G.html
RewriteRule ^store/ccp0-prodidx/H\.html$ http://www.example.com/store/Product_Index_H [L,R=permanent]
RewriteRule ^store/Product_Index_H$ store/ccp0-prodidx/H.html
RewriteRule ^store/ccp0-prodidx/I\.html$ http://www.example.com/store/Product_Index_I [L,R=permanent]
RewriteRule ^store/Product_Index_I$ store/ccp0-prodidx/I.html
RewriteRule ^store/ccp0-prodidx/J\.html$ http://www.example.com/store/Product_Index_J [L,R=permanent]
RewriteRule ^store/Product_Index_J$ store/ccp0-prodidx/J.html
RewriteRule ^store/ccp0-prodidx/K\.html$ http://www.example.com/store/Product_Index_K [L,R=permanent]
RewriteRule ^store/Product_Index_K$ store/ccp0-prodidx/K.html
RewriteRule ^store/ccp0-prodidx/L\.html$ http://www.example.com/store/Product_Index_L [L,R=permanent]
RewriteRule ^store/Product_Index_L$ store/ccp0-prodidx/L.html
RewriteRule ^store/ccp0-prodidx/M\.html$ http://www.example.com/store/Product_Index_M [L,R=permanent]
RewriteRule ^store/Product_Index_M$ store/ccp0-prodidx/M.html
RewriteRule ^store/ccp0-prodidx/N\.html$ http://www.example.com/store/Product_Index_N [L,R=permanent]
RewriteRule ^store/Product_Index_N$ store/ccp0-prodidx/N.html
RewriteRule ^store/ccp0-prodidx/O\.html$ http://www.example.com/store/Product_Index_O [L,R=permanent]
RewriteRule ^store/Product_Index_O$ store/ccp0-prodidx/O.html
RewriteRule ^store/ccp0-prodidx/P\.html$ http://www.example.com/store/Product_Index_P [L,R=permanent]
RewriteRule ^store/Product_Index_P$ store/ccp0-prodidx/P.html
RewriteRule ^store/ccp0-prodidx/Q\.html$ http://www.example.com/store/Product_Index_Q [L,R=permanent]
RewriteRule ^store/Product_Index_Q$ store/ccp0-prodidx/Q.html
RewriteRule ^store/ccp0-prodidx/R\.html$ http://www.example.com/store/Product_Index_R [L,R=permanent]
RewriteRule ^store/Product_Index_R$ store/ccp0-prodidx/R.html
RewriteRule ^store/ccp0-prodidx/S\.html$ http://www.example.com/store/Product_Index_S [L,R=permanent]
RewriteRule ^store/Product_Index_S$ store/ccp0-prodidx/S.html
RewriteRule ^store/ccp0-prodidx/T\.html$ http://www.example.com/store/Product_Index_T [L,R=permanent]
RewriteRule ^store/Product_Index_T$ store/ccp0-prodidx/T.html
RewriteRule ^store/ccp0-prodidx/U\.html$ http://www.example.com/store/Product_Index_U [L,R=permanent]
RewriteRule ^store/Product_Index_U$ store/ccp0-prodidx/U.html
RewriteRule ^store/ccp0-prodidx/V\.html$ http://www.example.com/store/Product_Index_V [L,R=permanent]
RewriteRule ^store/Product_Index_V$ store/ccp0-prodidx/V.html
RewriteRule ^store/ccp0-prodidx/W\.html$ http://www.example.com/store/Product_Index_W [L,R=permanent]
RewriteRule ^store/Product_Index_W$ store/ccp0-prodidx/W.html
RewriteRule ^store/ccp0-prodidx/X\.html$ http://www.example.com/store/Product_Index_X [L,R=permanent]
RewriteRule ^store/Product_Index_X$ store/ccp0-prodidx/X.html
RewriteRule ^store/ccp0-prodidx/Y\.html$ http://www.example.com/store/Product_Index_Y [L,R=permanent]
RewriteRule ^store/Product_Index_Y$ store/ccp0-prodidx/Y.html
RewriteRule ^store/ccp0-prodidx/Z\.html$ http://www.example.com/store/Product_Index_Z [L,R=permanent]
RewriteRule ^store/Product_Index_Z$ store/ccp0-prodidx/Z.html

And the sql statement is

Code:

$AtoZ = array("A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z");
foreach($AtoZ as $letter) 
{
//Start insertion to khxc_xmodhdseo table
//Change Product_Index_ to whatever you may want to use
$xmoddhseoid = "/ccp0-prodidx/".$letter.".html";
$xmoddhseourl = "/Product_Index_".$letter;
$addtokhxc_xmodhdseo = mysql_query("INSERT into khxc_xmodhdseo VALUES ('$xmoddhseoid','$xmoddhseourl')");
//End insertion to khxc_xmodhdseo table
}

Offline

 

#20 02-03-2009 13:44:55

CrownRoyal
Member
Registered: 01-10-2009
Posts: 677

Re: Editing the .htaccess fo the HD SEO XMOD

Something to note: If your product names have brackets, like "Widget A (PDF)", you will have to get rid of the brackets because they will not work with the rewrite command. I guess they are not an acceptable character in url lines.

Edit> Same goes for the pound sign (hash) '#'.

Last edited by CrownRoyal (02-03-2009 17:47:24)

Offline

 

#21 02-05-2009 01:48:42

polarize
Member
Registered: 11-15-2004
Posts: 227

Re: Editing the .htaccess fo the HD SEO XMOD

Crown Royal,

Thank you for posting this code. I tried it but couldn't connect to the database for some reason.  This concept of automation is a great idea and kind of what I expected from the HD SEO module in similar fashion.  I like the idea of the HD SEO Module but expected it to be more automated and interface friendly like the ATS module for version 5.1 we used for years that we could enter our own URL in the product listing that it would rewrite for us.

Your idea with this script and Nick's work on the HD SEO module in combination through an admin interface would work well together for those of us who are just learning some types of code but don't have the time to enter several lines of code for each URL (over 1,000 skus) with the possibility of one error that could cause pages to go into 404 error.

Can I suggest an update to the HD SEO module making it more user friendly?  This seems to be our biggest obstacle of how to train staff in this so that every time we insert a new product we need to add several lines of code to make the URL search engine friendly.

Anyone Please Comment.

Thanks


ClickCartPro Groupie! smile


Previous Versions:
ClickCartPro 7
ClickCartPro 6
ClickCartPro 5.1

Offline

 

#22 02-05-2009 07:34:30

CrownRoyal
Member
Registered: 01-10-2009
Posts: 677

Re: Editing the .htaccess fo the HD SEO XMOD

I agree. I also thought the HD SEO would be more automated too. If you think its a lot of work adding new product...try changing product names (due to duplication etc). I find it easiest now to simply keep the table of information as a csv file,make changes accordingly for the csv file and the htaccess file, then upload both.  I only know the very basics of php. I learn as I go, making lots of mistakes along the way. My current challenge is learning what to do in this thread https://forum.kryptronic.com/viewtopic.php?id=23518 John's #6 post has my brain swirling at the moment. smile

Last edited by CrownRoyal (02-05-2009 07:35:50)

Offline

 

#23 04-16-2009 23:32:11

Seder
Member
Registered: 03-27-2008
Posts: 19

Re: Editing the .htaccess fo the HD SEO XMOD

I am getting the 404 and I've gone through the posts with no luck. I've tried the configuration in many different ways. I think I just need a second set of eyes to catch what I'm missing.

I do have the Original CCP SEO set to TRUE, and the High Def SEO set to TRUE.

Below is what I have:


Options +FollowSymLinks
RewriteEngine on

RewriteRule ^premium_cigars_online/ccp0-catshow/601_Blue_Label\.html$ http://www.domainname.com/premium_cigar … bel-Cigars [L,R=permanent]
RewriteRule ^premium_cigars_online/601-Blue-Label-Cigars$ /ccp0-catshow/601_Blue_Label.html

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

-------------------------------------------------------

From the admin panel

Default URL
/ccp0-catshow/601_Blue_Label.html

High Definition SEO URL
/601-Blue-Label-Cigars



Thanks!

Offline

 

#24 04-16-2011 06:22:44

CrownRoyal
Member
Registered: 01-10-2009
Posts: 677

Re: Editing the .htaccess fo the HD SEO XMOD

Digging up an old thread smile since its on topic.

When I had to swap out my server's hard drive, we had to re-install everything from back up. I'm attempting to get the Rewrites working again. I couldn't get it to rewrites to work so I asked my IT guy for some help. He said;

I made a change to apache to allow htaccess override, so if rewrite was disabled, then it should work now via .htaccess. let me know ...

This is what I have in my htaccess file:

Code:

Options +FollowSymLinks
RewriteEngine on
RewriteRule ^store/ccp0-catshow/widgets\.html$ http://www.example.com/store/Widgets_Programs.html [L,R=permanent]
RewriteRule ^store/Widgets_Programs.html$ store/ccp0-catshow/widgets.html

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

This is what I have in the khxc_xmodhdseo table:

mysql> select * from khxc_xmodhdseo;
+-----------------------------------+-----------------------------------------------------------------------+
| id                                | url                                                                   |
+-----------------------------------+-----------------------------------------------------------------------+
| /ccp0-catshow/widgets.html     | /store/Widgets_Programs.html       |

So while the rewrite worked for http://www.example.com/store/ccp0-catshow/widgets.html having it switch to http://www.example.com/store/Widgets_Programs.html there's something still not right. When I mouse over the link, the rewrite should appear http://www.example.com/store/Widgets_Programs.html, what I see is the core URL http://www.example.com/store/index.php? … ef=widgets

My original setup which worked fine did not have the .html on the end of the url in the sql table and the Rewrite rule looked like this:

Code:

Options +FollowSymLinks
RewriteEngine on
RewriteRule ^store/ccp0-catshow/widgets\.html$ http://www.example.com/store/Widgets_Programs [L,R=permanent]
RewriteRule ^store/Widgets_Programs$ store/ccp0-catshow/widgets.html

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

I was attempting to update the rewrites to have the .html added on but maybe its throwing a monkey wrench into it.
Can someone provide some insight? Thanks.

Last edited by CrownRoyal (04-16-2011 06:31:45)

Offline

 

Board footer