Jump to content

  • Log in with Facebook Log in with Twitter Log In with Google      Sign In   
  • Create Account

Subscribe to HRA Now!

 



Are you a Google Analytics enthusiast?

Share and download Custom Google Analytics Reports, dashboards and advanced segments--for FREE! 

 



 

 www.CustomReportSharing.com 

From the folks who brought you High Rankings!



Photo
- - - - -

A Htaccess Redirect Not Kicking In For Some Reason


  • Please log in to reply
12 replies to this topic

#1 WesMcDermott

WesMcDermott

    HR 2

  • Members
  • PipPip
  • 42 posts
  • Location:Manchester, UK

Posted 22 February 2010 - 11:05 AM

Hi Randy, Ron, Guys!

I've been having some trouble with a clients website htaccess. It's a clickcart pro run website so it's a little different to what I've had to deal with before. We're currently at the stage of redirecting old software created urls to the newer versions. The new urls are currently showing within the website and software itself, however, we're not able to get the older urls to 301 redirect to the newer one's. The code looks ok to me but then again I'm no expert in htaccess so I thought I'd just stop by and see if any of you guys had an idea why they don't seem to be kicking in.

Here's the htaccess file in its entirety:

CODE
Options +FollowSymLinks
RewriteEngine On


#KHXC SEO RULES
RewriteRule ^sitemap.xml khxc/index.php?app=$1&ns=googlesitemap [L,PT]

RewriteRule ^$ /khxc/index.php
#End SEO Rules

RewriteBase /
RewriteCond %{HTTP_HOST} bulksupplementsdirect\.co.uk [NC]
RewriteCond %{HTTP_HOST} !^www\.bulksupplementsdirect\.co.uk [NC]
RewriteRule ^(.*) http://www.bulksupplementsdirect\.co.uk/$1 [L,R=301]
RewriteCond %{THE_REQUEST} ^.*\/index\.html?
RewriteRule ^(.*)index\.html?$ http://www.bulksupplementsdirect.co.uk/$1 [R=301,L]

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

RewriteRule ^khxc/gbu0-catshow/Amino_Acids\.html$ http://www.bulksupplementsdirect.co.uk/khxc/amino-acid-supplements.html [L,R=permanent]
RewriteRule ^khxc/amino-acid-supplements.html$ /khxc/gbu0-catshow/Amino_Acids.html

RewriteRule ^khxc/gbu0-prodshow/Acetyl_L_Carnitine\.html$ http://www.bulksupplementsdirect.co.uk/khxc/acetyl-l-carnitine-powder.html [L,R=permanent]
RewriteRule ^khxc/acetyl-l-carnitine-powder.html$ /khxc/gbu0-prodshow/Acetyl_L_Carnitine.html

RewriteRule ^khxc/gbu0-prodshow/Arginine_Alpha_Ketoglutarate\.html$ http://www.bulksupplementsdirect.co.uk/khxc/arginine-supplement.html [L,R=permanent]
RewriteRule ^khxc/arginine-supplement.html$ /khxc/gbu0-prodshow/Arginine_Alpha_Ketoglutarate.html

RewriteRule ^khxc/gbu0-prodshow/beta_alanine\.html$ http://www.bulksupplementsdirect.co.uk/khxc/beta-alanine-powder.html [L,R=permanent]
RewriteRule ^khxc/beta-alanine-powder.html$ /khxc/gbu0-prodshow/beta_alanine.html

RewriteRule ^khxc/gbu0-prodshow/Branched_Chain_Amino_Acids\.html$ http://www.bulksupplementsdirect.co.uk/khxc/bcaa-supplement.html [L,R=permanent]
RewriteRule ^khxc/bcaa-supplement.html$ /khxc/gbu0-prodshow/Branched_Chain_Amino_Acids.html

RewriteRule ^khxc/gbu0-prodshow/Citrulline_Malate\.html$ http://www.bulksupplementsdirect.co.uk/khxc/citrulline-malate-powder.html [L,R=permanent]
RewriteRule ^khxc/citrulline-malate-powder.html$ /khxc/gbu0-prodshow/Citrulline_Malate.html

RewriteRule ^khxc/gbu0-prodshow/D_Ribose\.html$ http://www.bulksupplementsdirect.co.uk/khxc/d-ribose-powder.html [L,R=permanent]
RewriteRule ^khxc/d-ribose-powder.html$ /khxc/gbu0-prodshow/D_Ribose.html

RewriteRule ^khxc/gbu0-prodshow/essential_amino_acids\.html$ http://www.bulksupplementsdirect.co.uk/khxc/essential-amino-acids.html [L,R=permanent]
RewriteRule ^khxc/essential-amino-acids.html$ /khxc/gbu0-prodshow/essential_amino_acids.html

RewriteRule ^khxc/gbu0-prodshow/GlutPeps\.html$ http://www.bulksupplementsdirect.co.uk/khxc/glutamine-peptides.html [L,R=permanent]
RewriteRule ^khxc/glutamine-peptides.html$ /khxc/gbu0-prodshow/GlutPeps.html

RewriteRule ^khxc/gbu0-prodshow/HMB\.html$ http://www.bulksupplementsdirect.co.uk/khxc/hmb-powder.html [L,R=permanent]
RewriteRule ^khxc/hmb-powder.html$ /khxc/gbu0-prodshow/HMB.html

RewriteRule ^khxc/gbu0-prodshow/lglutamine\.html$ http://www.bulksupplementsdirect.co.uk/khxc/l-glutamine-powder.html [L,R=permanent]
RewriteRule ^khxc/l-glutamine-powder.html$ /khxc/gbu0-prodshow/lglutamine.html

RewriteRule ^khxc/gbu0-prodshow/l_leucine\.html$ http://www.bulksupplementsdirect.co.uk/khxc/l-leucine-powder.html [L,R=permanent]
RewriteRule ^khxc/l-leucine-powder.html$ /khxc/gbu0-prodshow/l_leucine.html

RewriteRule ^khxc/gbu0-prodshow/BSD_L_Tyrosine_Powder\.html$ http://www.bulksupplementsdirect.co.uk/khxc/l-tyrosine-powder.html [L,R=permanent]
RewriteRule ^khxc/l-tyrosine-powder.html$ /khxc/gbu0-prodshow/BSD_L_Tyrosine_Powder.html

RewriteRule ^khxc/gbu0-prodshow/OAKG\.html$ http://www.bulksupplementsdirect.co.uk/khxc/l-orthinine.html [L,R=permanent]
RewriteRule ^khxc/l-orthinine.html$ /khxc/gbu0-prodshow/OAKG.html

RewriteRule ^khxc/gbu0-prodshow/taurine\.html$ http://www.bulksupplementsdirect.co.uk/khxc/pure-taurine-powder.html [L,R=permanent]
RewriteRule ^khxc/pure-taurine-powder.html$ /khxc/gbu0-prodshow/taurine.html

RewriteRule ^khxc/gbu0-catshow/Protein_Supplements\.html$ http://www.bulksupplementsdirect.co.uk/khxc/protein-supplements.html [L,R=permanent]
RewriteRule ^khxc/protein-supplements.html$ /khxc/gbu0-catshow/Protein_Supplements.html

RewriteRule ^khxc/gbu0-prodshow/Whey_Protein_Concentrate_F\.html$ http://www.bulksupplementsdirect.co.uk/khxc/flavoured-whey-protein-concentrate.html [L,R=permanent]
RewriteRule ^khxc/flavoured-whey-protein-concentrate.html$ /khxc/gbu0-prodshow/Whey_Protein_Concentrate_F.html

RewriteRule ^khxc/gbu0-prodshow/Whey_Protein_Concentrate_Un\.html$ http://www.bulksupplementsdirect.co.uk/khxc/unflavoured-whey-protein-concentrate.html [L,R=permanent]
RewriteRule ^khxc/unflavoured-whey-protein-concentrate.html$ /khxc/gbu0-prodshow/Whey_Protein_Concentrate_Un.html

RewriteRule ^khxc/gbu0-prodshow/Milk_Protein_Concentrate_F\.html$ http://www.bulksupplementsdirect.co.uk/khxc/flavoured-milk-protein-concentrate.html [L,R=permanent]
RewriteRule ^khxc/flavoured-milk-protein-concentrate.html$ /khxc/gbu0-prodshow/Milk_Protein_Concentrate_F.html

RewriteRule ^khxc/gbu0-prodshow/Milk_Protein_Concentrate_Un\.html$ http://www.bulksupplementsdirect.co.uk/khxc/unflavoured-casein-protein-powder.html [L,R=permanent]
RewriteRule ^khxc/unflavoured-casein-protein-powder.html$ /khxc/gbu0-prodshow/Milk_Protein_Concentrate_Un.html

RewriteRule ^khxc/gbu0-prodshow/Whey-Protein-Isolate-Flavoured\.html$ http://www.bulksupplementsdirect.co.uk/khxc/flavoured-whey-protein-isolate-powder.html [L,R=permanent]
RewriteRule ^khxc/flavoured-whey-protein-isolate-powder.html$ /khxc/gbu0-prodshow/Whey-Protein-Isolate-Flavoured.html

RewriteRule ^khxc/gbu0-prodshow/Whey-Protein-Isolate-Unflavoured\.html$ http://www.bulksupplementsdirect.co.uk/khxc/unflavoured-natural-whey-protein-isolate.html [L,R=permanent]
RewriteRule ^khxc/unflavoured-natural-whey-protein-isolate.html$ /khxc/gbu0-prodshow/Whey-Protein-Isolate-Unflavoured.html

RewriteRule ^khxc/gbu0-catshow/Bulk_Whey_Protein\.html$ http://www.bulksupplementsdirect.co.uk/khxc/bulk-protein.html [L,R=permanent]
RewriteRule ^khxc/bulk-protein.html$ /khxc/gbu0-catshow/Bulk_Whey_Protein.html

RewriteRule ^khxc/gbu0-prodshow/MILK_PROTEIN_WHEY_PROTEIN_BAGGED\.html$ http://www.bulksupplementsdirect.co.uk/khxc/bulk-casein-and-whey-complete.html [L,R=permanent]
RewriteRule ^khxc/bulk-casein-and-whey-complete.html$ /khxc/gbu0-prodshow/MILK_PROTEIN_WHEY_PROTEIN_BAGGED.html

RewriteRule ^khxc/gbu0-prodshow/WHEY_PROTEIN_ISOLATE_FLAVOURED\.html$ http://www.bulksupplementsdirect.co.uk/khxc/bulk-whey-protein-isolate.html [L,R=permanent]
RewriteRule ^khxc/bulk-whey-protein-isolate.html$ /khxc/gbu0-prodshow/WHEY_PROTEIN_ISOLATE_FLAVOURED.html

RewriteRule ^khxc/gbu0-prodshow/WHEY_PROTEIN_ISOLATE_UNFLAVOURED\.html$ http://www.bulksupplementsdirect.co.uk/khxc/unflavoured-bulk-protein-isolate.html [L,R=permanent]
RewriteRule ^khxc/unflavoured-bulk-protein-isolate.html$ /khxc/gbu0-prodshow/WHEY_PROTEIN_ISOLATE_UNFLAVOURED.html

RewriteRule ^khxc/gbu0-prodshow/Milk_Protein_Concentrate_Flavoured_B\.html$ http://www.bulksupplementsdirect.co.uk/khxc/bulk-milk-protein.html [L,R=permanent]
RewriteRule ^khxc/bulk-milk-protein.html$ /khxc/gbu0-prodshow/Milk_Protein_Concentrate_Flavoured_B.html

RewriteRule ^khxc/gbu0-prodshow/MILK_PROTEIN_UNFLAVOURED_\.html$ http://www.bulksupplementsdirect.co.uk/khxc/bulk-casein-protein.html [L,R=permanent]
RewriteRule ^khxc/bulk-casein-protein.html$ /khxc/gbu0-prodshow/MILK_PROTEIN_UNFLAVOURED_.html

RewriteRule ^khxc/gbu0-prodshow/PP_WPC_Unflav\.html$ http://www.bulksupplementsdirect.co.uk/khxc/bulk-whey-protein-concentrate.html [L,R=permanent]
RewriteRule ^khxc/bulk-whey-protein-concentrate.html$ /khxc/gbu0-prodshow/PP_WPC_Unflav.html

RewriteRule ^khxc/gbu0-prodshow/BSD_Optimise_Whey_Protein_Blend\.html$ http://www.bulksupplementsdirect.co.uk/khxc/whey-protein-blend.html [L,R=permanent]
RewriteRule ^khxc/whey-protein-blend.html$ /khxc/gbu0-prodshow/BSD_Optimise_Whey_Protein_Blend.html

RewriteRule ^khxc/gbu0-prodshow/Hemp_Protein\.html$ http://www.bulksupplementsdirect.co.uk/khxc/hemp-protein-powder.html [L,R=permanent]
RewriteRule ^khxc/hemp-protein-powder.html$ /khxc/gbu0-prodshow/Hemp_Protein.html

RewriteRule ^khxc/gbu0-catshow/Protein_Blend_\.html$ http://www.bulksupplementsdirect.co.uk/khxc/protein-blends.html [L,R=permanent]
RewriteRule ^khxc/protein-blends.html$ /khxc/gbu0-catshow/Protein_Blend_.html

RewriteRule ^khxc/gbu0-prodshow/Milk_Whey_Protein_Complete_F\.html$ http://www.bulksupplementsdirect.co.uk/khxc/casein-whey-protein.html [L,R=permanent]
RewriteRule ^khxc/casein-whey-protein.html$ /khxc/gbu0-prodshow/Milk_Whey_Protein_Complete_F.html

RewriteRule ^khxc/gbu0-prodshow/ULTIMATE_PROTEIN_BLEND_UNFLAV\.html$ http://www.bulksupplementsdirect.co.uk/khxc/unflavoured-bsd-optimise.html [L,R=permanent]
RewriteRule ^khxc/unflavoured-bsd-optimise.html$ /khxc/gbu0-prodshow/ULTIMATE_PROTEIN_BLEND_UNFLAV.html

RewriteRule ^khxc/gbu0-prodshow/WHEY_PROTEIN_MILK_PROTEIN_BLENDS\.html$ http://www.bulksupplementsdirect.co.uk/khxc/flavoured-bsd-optimise.html [L,R=permanent]
RewriteRule ^khxc/flavoured-bsd-optimise.html$ /khxc/gbu0-prodshow/WHEY_PROTEIN_MILK_PROTEIN_BLENDS.html

RewriteRule ^khxc/gbu0-prodshow/Milk_Whey_Protein_Complete\.html$ http://www.bulksupplementsdirect.co.uk/khxc/milk-whey-protein.html [L,R=permanent]
RewriteRule ^khxc/milk-whey-protein.html$ /khxc/gbu0-prodshow/Milk_Whey_Protein_Complete.html

RewriteRule ^khxc/gbu0-catshow/BSD_Bulk_Capsules\.html$ http://www.bulksupplementsdirect.co.uk/khxc/capsules-tablets.html [L,R=permanent]
RewriteRule ^khxc/capsules-tablets.html$ /khxc/gbu0-catshow/BSD_Bulk_Capsules.html

RewriteRule ^khxc/gbu0-prodshow/BCAA_Tablets\.html$ http://www.bulksupplementsdirect.co.uk/khxc/bcaa-amino-acid-capsules.html [L,R=permanent]
RewriteRule ^khxc/bcaa-amino-acid-capsules.html$ /khxc/gbu0-prodshow/BCAA_Tablets.html

RewriteRule ^khxc/gbu0-prodshow/Beta_Alanine_Capsules\.html$ http://www.bulksupplementsdirect.co.uk/khxc/beta-alanine-capsules.html [L,R=permanent]
RewriteRule ^khxc/beta-alanine-capsules.html$ /khxc/gbu0-prodshow/Beta_Alanine_Capsules.html

RewriteRule ^khxc/gbu0-prodshow/Creatine_Ethyl_Ester_Capsules\.html$ http://www.bulksupplementsdirect.co.uk/khxc/creatine-ethyl-ester-tablets.html [L,R=permanent]
RewriteRule ^khxc/creatine-ethyl-ester-tablets.html$ /khxc/gbu0-prodshow/Creatine_Ethyl_Ester_Capsules.html

RewriteRule ^khxc/gbu0-prodshow/Joint_Support_Max\.html$ http://www.bulksupplementsdirect.co.uk/khxc/joint-capsules.html [L,R=permanent]
RewriteRule ^khxc/joint-capsules.html$ /khxc/gbu0-prodshow/Joint_Support_Max.html

RewriteRule ^khxc/gbu0-prodshow/BSD_Glutamine_Capsules\.html$ http://www.bulksupplementsdirect.co.uk/khxc/glutamine-capsules.html [L,R=permanent]
RewriteRule ^khxc/glutamine-capsules.html$ /khxc/gbu0-prodshow/BSD_Glutamine_Capsules.html

RewriteRule ^khxc/gbu0-prodshow/Glucosamine_Sulphate_1000mg\.html$ http://www.bulksupplementsdirect.co.uk/khxc/glucosamine-sulphate-tablets.html [L,R=permanent]
RewriteRule ^khxc/glucosamine-sulphate-tablets.html$ /khxc/gbu0-prodshow/Glucosamine_Sulphate_1000mg.html

RewriteRule ^khxc/gbu0-prodshow/Greent_Tea_Extract_Capsules\.html$ http://www.bulksupplementsdirect.co.uk/khxc/mega-green-tea-capsules.html [L,R=permanent]
RewriteRule ^khxc/mega-green-tea-capsules.html$ /khxc/gbu0-prodshow/Greent_Tea_Extract_Capsules.html

RewriteRule ^khxc/gbu0-prodshow/Nitric_Oxide_2_Max\.html$ http://www.bulksupplementsdirect.co.uk/khxc/nitric-oxide-capsules.html [L,R=permanent]
RewriteRule ^khxc/nitric-oxide-capsules.html$ /khxc/gbu0-prodshow/Nitric_Oxide_2_Max.html

RewriteRule ^khxc/gbu0-prodshow/L_Tyrosine_Capsules_500mg\.html$ http://www.bulksupplementsdirect.co.uk/khxc/l-tyrosine-capsules.html [L,R=permanent]
RewriteRule ^khxc/l-tyrosine-capsules.html$ /khxc/gbu0-prodshow/L_Tyrosine_Capsules_500mg.html

RewriteRule ^khxc/gbu0-prodshow/Taurine_Capsules_500mg\.html$ http://www.bulksupplementsdirect.co.uk/khxc/taurine-capsules.html [L,R=permanent]
RewriteRule ^khxc/taurine-capsules.html$ /khxc/gbu0-prodshow/Taurine_Capsules_500mg.html

RewriteRule ^khxc/gbu0-prodshow/BSD_VitaminC_Tablets_1000mg\.html$ http://www.bulksupplementsdirect.co.uk/khxc/vitamin-c-tablets.html [L,R=permanent]
RewriteRule ^khxc/vitamin-c-tablets.html$ /khxc/gbu0-prodshow/BSD_VitaminC_Tablets_1000mg.html

RewriteRule ^khxc/gbu0-catshow/Creatine\.html$ http://www.bulksupplementsdirect.co.uk/khxc/creatine-supplements.html [L,R=permanent]
RewriteRule ^khxc/creatine-supplements.html$ /khxc/gbu0-catshow/Creatine.html

RewriteRule ^khxc/gbu0-prodshow/Creatine_Ethyl_Ester_Powder\.html$ http://www.bulksupplementsdirect.co.uk/khxc/creatine-ethyl-ester-powder.html [L,R=permanent]
RewriteRule ^khxc/creatine-ethyl-ester-powder.html$ /khxc/gbu0-prodshow/Creatine_Ethyl_Ester_Powder.html

RewriteRule ^khxc/gbu0-prodshow/Creatine_99\.html$ http://www.bulksupplementsdirect.co.uk/khxc/pure-creatine-monohydrate-powder.html [L,R=permanent]
RewriteRule ^khxc/pure-creatine-monohydrate-powder.html$ /khxc/gbu0-prodshow/Creatine_99.html

RewriteRule ^khxc/gbu0-catshow/Essential_Fatty_Acids\.html$ http://www.bulksupplementsdirect.co.uk/khxc/essential-fatty-acids.html [L,R=permanent]
RewriteRule ^khxc/essential-fatty-acids.html$ /khxc/gbu0-catshow/Essential_Fatty_Acids.html

RewriteRule ^khxc/gbu0-prodshow/BSD_Virgin_Coconut_Oil\.html$ http://www.bulksupplementsdirect.co.uk/khxc/virgin-coconut-oil.html [L,R=permanent]
RewriteRule ^khxc/virgin-coconut-oil.html$ /khxc/gbu0-prodshow/BSD_Virgin_Coconut_Oil.html

RewriteRule ^khxc/gbu0-prodshow/CLA_1000\.html$ http://www.bulksupplementsdirect.co.uk/khxc/cla-supplement.html [L,R=permanent]
RewriteRule ^khxc/cla-supplement.html$ /khxc/gbu0-prodshow/CLA_1000.html

RewriteRule ^khxc/gbu0-prodshow/fish_oils\.html$ http://www.bulksupplementsdirect.co.uk/khxc/omega-3-capsules.html [L,R=permanent]
RewriteRule ^khxc/omega-3-capsules.html$ /khxc/gbu0-prodshow/fish_oils.html

RewriteRule ^khxc/gbu0-prodshow/Omega_3_Fish_Oils_3312\.html$ http://www.bulksupplementsdirect.co.uk/khxc/super-omega-3.html [L,R=permanent]
RewriteRule ^khxc/super-omega-3.html$ /khxc/gbu0-prodshow/Omega_3_Fish_Oils_3312.html

RewriteRule ^khxc/gbu0-prodshow/BSD_Superba_Antartic_Krill_Oil_500mg\.html$ http://www.bulksupplementsdirect.co.uk/khxc/krill-oil-capsules.html [L,R=permanent]
RewriteRule ^khxc/krill-oil-capsules.html$ /khxc/gbu0-prodshow/BSD_Superba_Antartic_Krill_Oil_500mg.html

RewriteRule ^khxc/gbu0-catshow/Mass_Gainer_\.html$ http://www.bulksupplementsdirect.co.uk/khxc/weight-mass-gainer-supplements.html [L,R=permanent]
RewriteRule ^khxc/weight-mass-gainer-supplements.html$ /khxc/gbu0-catshow/Mass_Gainer_.html

RewriteRule ^khxc/gbu0-prodshow/BSDMASSG25kg\.html$ http://www.bulksupplementsdirect.co.uk/khxc/weight-gain-powder.html [L,R=permanent]
RewriteRule ^khxc/weight-gain-powder.html$ /khxc/gbu0-prodshow/BSDMASSG25kg.html

RewriteRule ^khxc/gbu0-prodshow/BSD_MassGainer_Bagged\.html$ http://www.bulksupplementsdirect.co.uk/khxc/mass-gain-supplement.html [L,R=permanent]
RewriteRule ^khxc/mass-gain-supplement.html$ /khxc/gbu0-prodshow/BSD_MassGainer_Bagged.html

RewriteRule ^khxc/gbu0-catshow/Meal_Replacement_Complete\.html$ http://www.bulksupplementsdirect.co.uk/khxc/meal-replacement-powders.html [L,R=permanent]
RewriteRule ^khxc/meal-replacement-powders.html$ /khxc/gbu0-catshow/Meal_Replacement_Complete.html

RewriteRule ^khxc/gbu0-prodshow/Meal_Replacement_Complete_Unflav\.html$ http://www.bulksupplementsdirect.co.uk/khxc/unflavoured-meal-replacement-supplement.html [L,R=permanent]
RewriteRule ^khxc/unflavoured-meal-replacement-supplement.html$ /khxc/gbu0-prodshow/Meal_Replacement_Complete_Unflav.html

RewriteRule ^khxc/gbu0-prodshow/Meal_Replacement_Complete\.html$ http://www.bulksupplementsdirect.co.uk/khxc/flavoured-meal-replacement-powder.html [L,R=permanent]
RewriteRule ^khxc/flavoured-meal-replacement-powder.html$ /khxc/gbu0-prodshow/Meal_Replacement_Complete.html

RewriteRule ^khxc/gbu0-catshow/bsd_custom_blends\.html$ http://www.bulksupplementsdirect.co.uk/khxc/pre-workout-supplements.html [L,R=permanent]
RewriteRule ^khxc/pre-workout-supplements.html$ /khxc/gbu0-catshow/bsd_custom_blends.html

RewriteRule ^khxc/gbu0-prodshow/BSD_Reloaded\.html$ http://www.bulksupplementsdirect.co.uk/khxc/bsd-reloaded.html [L,R=permanent]
RewriteRule ^khxc/bsd-reloaded.html$ /khxc/gbu0-prodshow/BSD_Reloaded.html

RewriteRule ^khxc/gbu0-prodshow/AktivBarley\.html$ http://www.bulksupplementsdirect.co.uk/khxc/aktivated-barley.html [L,R=permanent]
RewriteRule ^khxc/aktivated-barley.html$ /khxc/gbu0-prodshow/AktivBarley.html

RewriteRule ^khxc/gbu0-prodshow/Glyco_Active_Carbohydrates\.html$ http://www.bulksupplementsdirect.co.uk/khxc/glyco-active.html [L,R=permanent]
RewriteRule ^khxc/glyco-active.html$ /khxc/gbu0-prodshow/Glyco_Active_Carbohydrates.html

RewriteRule ^khxc/gbu0-prodshow/Dextrose\.html$ http://www.bulksupplementsdirect.co.uk/khxc/dextrose-powder.html [L,R=permanent]
RewriteRule ^khxc/dextrose-powder.html$ /khxc/gbu0-prodshow/Dextrose.html

RewriteRule ^khxc/gbu0-prodshow/Maltodextrin\.html$ http://www.bulksupplementsdirect.co.uk/khxc/maltodextrin-powder.html [L,R=permanent]
RewriteRule ^khxc/maltodextrin-powder.html$ /khxc/gbu0-prodshow/Maltodextrin.html

RewriteRule ^khxc/gbu0-prodshow/Oats\.html$ http://www.bulksupplementsdirect.co.uk/khxc/ultra-fine-oat-powder.html [L,R=permanent]
RewriteRule ^khxc/ultra-fine-oat-powder.html$ /khxc/gbu0-prodshow/Oats.html

RewriteRule ^khxc/gbu0-prodshow/Waxy_Maize_Starch\.html$ http://www.bulksupplementsdirect.co.uk/khxc/waxy-maize-supplement.html [L,R=permanent]
RewriteRule ^khxc/waxy-maize-supplement.html$ /khxc/gbu0-prodshow/Waxy_Maize_Starch.html

RewriteRule ^khxc/gbu0-catshow/BSD_Recovery_Cat\.html$ http://www.bulksupplementsdirect.co.uk/khxc/post-workout-recovery-supplements.html [L,R=permanent]
RewriteRule ^khxc/post-workout-recovery-supplements.html$ /khxc/gbu0-catshow/BSD_Recovery_Cat.html

RewriteRule ^khxc/gbu0-prodshow/Regenerate\.html$ http://www.bulksupplementsdirect.co.uk/khxc/bsd-regenerate-tubbed.html [L,R=permanent]
RewriteRule ^khxc/bsd-regenerate-tubbed.html$ /khxc/gbu0-prodshow/Regenerate.html

RewriteRule ^khxc/gbu0-prodshow/BSD_Regenerate_\.html$ http://www.bulksupplementsdirect.co.uk/khxc/bsd-regenerate-bagged.html [L,R=permanent]
RewriteRule ^khxc/bsd-regenerate-bagged.html$ /khxc/gbu0-prodshow/BSD_Regenerate_.html

RewriteRule ^khxc/gbu0-catshow/Joint_Care\.html$ http://www.bulksupplementsdirect.co.uk/khxc/joint-care-supplements.html [L,R=permanent]
RewriteRule ^khxc/joint-care-supplements.html$ /khxc/gbu0-catshow/Joint_Care.html

RewriteRule ^khxc/gbu0-prodshow/MSM\.html$ http://www.bulksupplementsdirect.co.uk/khxc/msm-supplement-powder.html [L,R=permanent]
RewriteRule ^khxc/msm-supplement-powder.html$ /khxc/gbu0-prodshow/MSM.html

RewriteRule ^khxc/gbu0-prodshow/BSD_Ultra_Cissus_Quadrangularis\.html$ http://www.bulksupplementsdirect.co.uk/khxc/cissus-quadrangularis.html [L,R=permanent]
RewriteRule ^khxc/cissus-quadrangularis.html$ /khxc/gbu0-prodshow/BSD_Ultra_Cissus_Quadrangularis.html

RewriteRule ^khxc/gbu0-catshow/Health_WellBeing\.html$ http://www.bulksupplementsdirect.co.uk/khxc/health-supplements.html [L,R=permanent]
RewriteRule ^khxc/health-supplements.html$ /khxc/gbu0-catshow/Health_WellBeing.html

RewriteRule ^khxc/gbu0-prodshow/Ultra_Greens_Plus\.html$ http://www.bulksupplementsdirect.co.uk/khxc/ultra-greens-plus-powder.html [L,R=permanent]
RewriteRule ^khxc/ultra-greens-plus-powder.html$ /khxc/gbu0-prodshow/Ultra_Greens_Plus.html

RewriteRule ^khxc/gbu0-prodshow/CQ10\.html$ http://www.bulksupplementsdirect.co.uk/khxc/coq10-supplement.html [L,R=permanent]
RewriteRule ^khxc/coq10-supplement.html$ /khxc/gbu0-prodshow/CQ10.html

RewriteRule ^khxc/gbu0-prodshow/Electrolyte_Powder_Essential_Salts\.html$ http://www.bulksupplementsdirect.co.uk/khxc/electrolyte-powder.html [L,R=permanent]
RewriteRule ^khxc/electrolyte-powder.html$ /khxc/gbu0-prodshow/Electrolyte_Powder_Essential_Salts.html

RewriteRule ^khxc/gbu0-prodshow/Green_Tea\.html$ http://www.bulksupplementsdirect.co.uk/khxc/green-tea-extract.html [L,R=permanent]
RewriteRule ^khxc/green-tea-extract.html$ /khxc/gbu0-prodshow/Green_Tea.html

RewriteRule ^khxc/gbu0-prodshow/BSD_NA_RALA_Alpha_Lipoic_Acid_Capsules\.html$ http://www.bulksupplementsdirect.co.uk/khxc/alpha-lipoic-acid-powder.html [L,R=permanent]
RewriteRule ^khxc/alpha-lipoic-acid-powder.html$ /khxc/gbu0-prodshow/BSD_NA_RALA_Alpha_Lipoic_Acid_Capsules.html

RewriteRule ^khxc/gbu0-prodshow/Resveratrol_Powder\.html$ http://www.bulksupplementsdirect.co.uk/khxc/resveratrol-supplement.html [L,R=permanent]
RewriteRule ^khxc/resveratrol-supplement.html$ /khxc/gbu0-prodshow/Resveratrol_Powder.html

RewriteRule ^khxc/gbu0-prodshow/RR\.html$ http://www.bulksupplementsdirect.co.uk/khxc/rhodiola-rosea-powder.html [L,R=permanent]
RewriteRule ^khxc/rhodiola-rosea-powder.html$ /khxc/gbu0-prodshow/RR.html

RewriteRule ^khxc/gbu0-prodshow/Tribulus_Terrestris\.html$ http://www.bulksupplementsdirect.co.uk/khxc/tribulus-terrestris-powder.html [L,R=permanent]
RewriteRule ^khxc/tribulus-terrestris-powder.html$ /khxc/gbu0-prodshow/Tribulus_Terrestris.html

RewriteRule ^khxc/gbu0-prodshow/BSD_ZMA_500mg\.html$ http://www.bulksupplementsdirect.co.uk/khxc/zma-supplement.html [L,R=permanent]
RewriteRule ^khxc/zma-supplement.html$ /khxc/gbu0-prodshow/BSD_ZMA_500mg.html

RewriteRule ^khxc/gbu0-prodshow/ZMA_750mg_Capsules\.html$ http://www.bulksupplementsdirect.co.uk/khxc/zma-capsules.html [L,R=permanent]
RewriteRule ^khxc/zma-capsules.html$ /khxc/gbu0-prodshow/ZMA_750mg_Capsules.html

RewriteRule ^khxc/gbu0-catshow/Fat_Loss\.html$ http://www.bulksupplementsdirect.co.uk/khxc/weight-fat-loss-supplements.html [L,R=permanent]
RewriteRule ^khxc/weight-fat-loss-supplements.html$ /khxc/gbu0-catshow/Fat_Loss.html

RewriteRule ^khxc/gbu0-prodshow/Bulk_Supplements_Direct_Tri_Creatine_Malate\.html$ http://www.bulksupplementsdirect.co.uk/khxc/tri-creatine-malate.html [L,R=permanent]
RewriteRule ^khxc/tri-creatine-malate.html$ /khxc/gbu0-prodshow/Bulk_Supplements_Direct_Tri_Creatine_Malate.html


Thanks guys, any help would be much appreciated, this has got me stumped...

#2 Randy

Randy

    Convert Me!

  • Moderator
  • 17,540 posts

Posted 22 February 2010 - 12:05 PM

Time for a little teaching lesson I think, since it'll do you more good down the road and hopefully will do the same for others. wink1.gif

So you're saying it simply does nothing when it should be doing something Wes?

When this happens it typically means there is a syntax error somewhere in your .htaccess. These sort of errors can cause everything after them to not fire because the server by its nature will try to display something. Even if the something is a 404 Not Found page.

Further since .htaccess is read and executed from the top down, the closer to the top the syntax error appears the more rules it affects, or really negates from firing.

That'll give you an idea of the logic I try to use when looking for problems when an .htaccess isn't doing what I think is should do.

From there the next thing I look for -- because I do this myself far too often giggle.gif -- is an UNescaped period where it needs to be escaped. Periods in regular expressions have special meaning, so you have to escape them with a backslash to tell Apache you mean a literal period character and not the special meaning that is native in regular expressions.

So given these two things when I look at your .htaccess I see just a few problems.

Here's a short two rule approach I follow with regards to periods.
  • Since RewriteCond's are Matching Statements, the urls in them should always use a backslash to escape periods.
  • For RewriteRule's the first (matching) half should always have escaped periods, and the latter (destination) half should never have escaped periods.
Those two simple rules have served me quite well over the years.

Starting in the section where you set the RewriteBase there are some inconsistencies with regards to periods. Some RewriteCond (matching) statements do not contain escaped periods where the definitely need to be escaped. There are also escaped periods in the 2nd half of some of your RewriteRule statements that do contain escaped periods where they are not needed and shouldn't be there.

Taking just the first section as an example, applying the two rules above would change:

CODE
RewriteCond %{HTTP_HOST} bulksupplementsdirect\.co.uk [NC]
RewriteCond %{HTTP_HOST} !^www\.bulksupplementsdirect\.co.uk [NC]
RewriteRule ^(.*) http://www.bulksupplementsdirect\.co.uk/$1 [L,R=301]


To:

CODE
RewriteCond %{HTTP_HOST} bulksupplementsdirect\.co\.uk [NC]
RewriteCond %{HTTP_HOST} !^www\.bulksupplementsdirect\.co\.uk [NC]
RewriteRule ^(.*) http://www.bulksupplementsdirect.co.uk/$1 [L,R=301]


The three differences between this example is subtle. So subtle to be hard to spot. I added an escape on the two RewriteCond lines just before the .uk. And removed an escape in the 2nd (destination) half of the RewriteRule where one appeared just before the .co

If you go through each of the .htaccess sections and apply these two simple rules you should get a lot more consistency in how the rules are being applied.

#3 WesMcDermott

WesMcDermott

    HR 2

  • Members
  • PipPip
  • 42 posts
  • Location:Manchester, UK

Posted 22 February 2010 - 02:11 PM

Thanks as always Randy notworthy.gif , seems all I do is ask for help with the htaccess, a good few lessons on it is in order me thinks! Although the two rules you've given there should keep me going...

Will be back again to confirm success or failure! wink1.gif

#4 WesMcDermott

WesMcDermott

    HR 2

  • Members
  • PipPip
  • 42 posts
  • Location:Manchester, UK

Posted 23 February 2010 - 07:21 AM

Randy, I've corrected the first section of the htaccess and looked through all of the rules to apply what you said. As an example would this be the correct way to apply the rule?

Old version


CODE
RewriteRule ^khxc/gbu0-catshow/Amino_Acids\.html$ http://www.bulksupplementsdirect.co.uk/khxc/amino-acid-supplements.html  [L,R=permanent]
RewriteRule ^khxc/amino-acid-supplements.html$ /khxc/gbu0-catshow/Amino_Acids.html


New Version

CODE
RewriteRule ^khxc/gbu0-catshow/Amino_Acids\.html$  http://www.bulksupplementsdirect.co.uk/khxc/amino-acid-supplements.html] [L,R=permanent]
RewriteRule ^khxc/amino-acid-supplements\.html$ /khxc/gbu0-catshow/Amino_Acids.html


The latter involving an escape in the first half of the 2nd rule...

#5 Randy

Randy

    Convert Me!

  • Moderator
  • 17,540 posts

Posted 23 February 2010 - 11:44 AM

thumbup1.gif Looks correct to me at first glance Wes.

Though I do have to admit not really understanding the why behind those latter sets of two rules. I think I understand what they're doing, which is Redirecting in the first rule and then Rewriting the new url back to the old location. I just don't get the Why of it.

If it were me personally I would always have a Last or [L] flag behind each of those two lines just to stop the rest of the .htaccess from being processed once there was a match on one of them. I try to force myself to always use the Last flag to keep from inadvertently creating an endless loop.

#6 1dmf

1dmf

    Keep Asking, Keep Questioning, Keep Learning

  • Active Members
  • PipPipPipPipPipPipPip
  • 2,167 posts
  • Location:Worthing - England

Posted 23 February 2010 - 12:05 PM

Completely unrelated but Randy's logic is worth noting.

CSS & Javascript also do the same thing, stop processing after reaching an error!

(well in FF CSS stops, not always the case in IE!)

#7 WesMcDermott

WesMcDermott

    HR 2

  • Members
  • PipPip
  • 42 posts
  • Location:Manchester, UK

Posted 24 February 2010 - 06:55 AM

QUOTE(Randy @ Feb 23 2010, 04:44 PM) View Post
thumbup1.gif Looks correct to me at first glance Wes.

Though I do have to admit not really understanding the why behind those latter sets of two rules. I think I understand what they're doing, which is Redirecting in the first rule and then Rewriting the new url back to the old location. I just don't get the Why of it.

If it were me personally I would always have a Last or [L] flag behind each of those two lines just to stop the rest of the .htaccess from being processed once there was a match on one of them. I try to force myself to always use the Last flag to keep from inadvertently creating an endless loop.


Randy, you're guess is as good as mine I'm afraid, this is how it was recommended in the guide that came with the HDSEO plugin for the clickcart pro software. I'll make that change to every rule and let you know the outcome. How would the rules look for instance if you were to write them out? Using the amino acids url as an example...

#8 WesMcDermott

WesMcDermott

    HR 2

  • Members
  • PipPip
  • 42 posts
  • Location:Manchester, UK

Posted 24 February 2010 - 07:30 AM

QUOTE(WesMcDermott @ Feb 24 2010, 11:55 AM) View Post
Randy, you're guess is as good as mine I'm afraid, this is how it was recommended in the guide that came with the HDSEO plugin for the clickcart pro software. I'll make that change to every rule and let you know the outcome. How would the rules look for instance if you were to write them out? Using the amino acids url as an example...


I've been through the htaccess and made the changes to the rules whereby I add escape the first line of the rule, but the redirects still aren't kicking in.

#9 Randy

Randy

    Convert Me!

  • Moderator
  • 17,540 posts

Posted 24 February 2010 - 11:55 AM

QUOTE
How would the rules look for instance if you were to write them out? Using the amino acids url as an example...


I don't think I can give you an example Wes. I would need to have a better grasp on Why certain rules are being used, and why they're being used in the order they're being used. There are more than a couple things that make little or no sense to me, so I have to assume I'm just not getting the logic behind the rules.

A quick example of one section that totally confuses me perhaps will help. And granted the distinctions are subtle in the syntax, but important none the less. Let's look at one little three line section from the original version.

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

RewriteRule ^khxc/gbu0-catshow/Amino_Acids\.html$ http://www.bulksupplementsdirect.co.uk/khxc/amino-acid-supplements.html [L,R=permanent]
RewriteRule ^khxc/amino-acid-supplements.html$ /khxc/gbu0-catshow/Amino_Acids.html


Okay, the first line is a basic url rewrite. In the regex pattern matching section it's looking for hits that match a pattern of khxc/anything1-anything2/anything3.html and using the page at khxc/index.php?app=anything1&ns=anything2&ref=anything3 to produce the content.

Pretty standard url rewrite stuff there.

But, and it's potentially a huge but in this case the [] Flags confuse me. The L or Last flag I sort of get, but the combination of L and PT has me baffled.

L or Last means exactly what it says. If the rule fires it is the Last.

PT is one I very, very rarely use myself. PT stands for PassThrough. Meaning you need to allow something from this rule to pass through to a later rule.

But (you knew it was coming!) I just don't get the logic behind using both L/Last, telling mod_rewrite to stop and PT/PassThrough at the same time. They are at opposite ends of the spectrum of possibilities, and directly conflict with one another.

As I said above, I do not use PT hardly at all so I'm hoping I missing something in the logic of it. But on the surface it certainly looks like those two flags conflict with each other in a big way.

Then let's look at the order.

Since the first catch all type of rule comes first, and the individual rewrites/redirects come later I'm having trouble figuring out how some of those later rules will ever actually fire. Take the 1st and 2nd rules for instance. The pattern of the 2nd rule is going to match the first rule also as far as I can tell. Thus I have to question if the 2nd rule ever has a chance of firing.

What do I mean by this?

Well, the first part of the first rule sets a pattern that looks like

khxc/anything1-anything2/anything3.html

The first part of the third rule looks for something more specific, but with the same pattern. It looks for

khxc/gbu0-catshow/Amino_Acids.html

See how the pattern is the same?

I'm having difficulty seeing how this 2nd rule that is supposed to redirect will ever have a chance to fire. Because each time this url hits the server it's going to hit the url rewrite in the first rule, which has a L or Last flag remember, and the 1st rule is going to be processed, but the 2nd will never be processed.

I just don't get it I presume. I figure I have to be missing something because I don't have all of the details. But I do not see how the rules that come later in the .htaccess with the same pattern will ever fire. This is one of those cases where typically I'd have the more specific rules first and the more blanket catchall rule later. But I hesitate to recommend this because I just don't understand why some things are being done.

Wish I could be of more help. But without having a better grasp on Why certain things are being done any advice I might give would probably cause more harm than good.

#10 WesMcDermott

WesMcDermott

    HR 2

  • Members
  • PipPip
  • 42 posts
  • Location:Manchester, UK

Posted 01 March 2010 - 07:19 AM

Hi Randy,

From what I can tell, the catch all rule is rewriting the original urls generated by the software before the new HDSEO plugin was installed into the format /khxc/gbu_catshow/filename.html. Then in the HDSEO plugin I can manage those urls (/khxc/gbu_catshow/) by changing them to whatever I want such as /khxc/amino-acid-supplements.html. But this only rewrites the urls within the navigation of the website.

I'm completely at a loss now on this Randy, what would you try? I can always restore the original htaccess if all else fails...

#11 Randy

Randy

    Convert Me!

  • Moderator
  • 17,540 posts

Posted 01 March 2010 - 12:02 PM

Does the CMS have a forum or some type of support you can avail yourself of Wes?

I'm still just guessing, but it almost looks like you've got two modules that may be competing with each other. If that's the case they should be able to give you a quick example or tell you what to add/remove to make it all work as expected. They know better than anyone how the back end processes work, since they developed them.

#12 WesMcDermott

WesMcDermott

    HR 2

  • Members
  • PipPip
  • 42 posts
  • Location:Manchester, UK

Posted 01 March 2010 - 12:31 PM

QUOTE(Randy @ Mar 1 2010, 05:02 PM) View Post
Does the CMS have a forum or some type of support you can avail yourself of Wes?

I'm still just guessing, but it almost looks like you've got two modules that may be competing with each other. If that's the case they should be able to give you a quick example or tell you what to add/remove to make it all work as expected. They know better than anyone how the back end processes work, since they developed them.


They do have a forum, but I was told that the HDSEO mod is not something they developed, so I'm waiting on them getting back to me with exactly who is.

#13 WesMcDermott

WesMcDermott

    HR 2

  • Members
  • PipPip
  • 42 posts
  • Location:Manchester, UK

Posted 16 March 2010 - 10:17 AM

HI Randy,

I've now been onto these guys and they basically say they cannot help because they're not experts in redirects. It's so frustrating, you pay for a mod from these guys and then you get next to zero support from them. I've now been messing around myself and removed all other bits of code and just used the one rule in the htaccess code that they have used in the HDSEO doc. It now reads:

[codebox]Options +FollowSymLinks
RewriteEngine On
RewriteRule ^khxc/gbu0-catshow/Amino_Acids\.html$ http://www.bulksuppl...upplements.html [L,R=permanent]
RewriteRule ^khxc/amino-acid-supplements.html$ /khxc/gbu0-catshow/Amino_Acids.html

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

I have also moved the line RewriteRule ^khxc/(.*)-(.*)/(.*)\.html khxc/index.php?app=$1&ns=$2&ref=$3 [L,PT] to the end of the document like it says in the document I have. When I uploaded this and tried accessing both urls in the rule they returned a redirect loop status. It was redirecting in a way that will never complete.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

We are now a read-only forum.
 
No new posts or registrations allowed.