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 04-06-2008 09:51:32

frwjd
Member
From: Lancaster, England
Registered: 02-08-2004
Posts: 219
Website

.htaccess file

Hi everyone

I have been struggling with my htaccess file for a couple of weeks. If I enable SEO I get errors from my website links. I have tried all of the different permutations in the wiki to no avail. Is there some different code for Bluehost servers?

url is http://www.french-regional-wines.co.uk

khxc is in public_html
the private directory is in the root

My .htaccess file in public_html looks like this (without SEO code)

Code:

RewriteEngine on
RewriteCond %{HTTP_HOST} ^french-regional-wines.co.uk$ [OR]
RewriteCond %{HTTP_HOST} ^www.french-regional-wines.co.uk$
RewriteRule ^/?$ http://www.french-regional-wines.co.uk/khxc/ [R=301,L]
# Use PHP5CGI as default
AddHandler fcgid-script .php
FCGIWrapper /usr/local/cpanel/cgi-sys/fcgiwrapper .php

The first part of the code redirects the base url to the khxc folder - won't work without it (just shows the public_html directory in the browser).

The second part of the code was put there by Bluehost - site won't work without that either.

I am totally out of my depth here and I would e extremely grateful for any help.

thanks

John

Offline

 

#2 04-06-2008 10:08:45

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

Re: .htaccess file

Have you tried a file that looks like this?  I removed the L from the R=301 line and added the "normal" rewrite rule for CCP.

Code:

RewriteEngine on
RewriteCond %{HTTP_HOST} ^french-regional-wines.co.uk$ [OR]
RewriteCond %{HTTP_HOST} ^www.french-regional-wines.co.uk$
RewriteRule ^/?$ http://www.french-regional-wines.co.uk/khxc/ [R=301]
RewriteRule ^khxc/(.*)-(.*)/(.*)\.html khxc/index.php?app=$1&ns=$2&ref=$3 [L,PT]
# Use PHP5CGI as default
AddHandler fcgid-script .php
FCGIWrapper /usr/local/cpanel/cgi-sys/fcgiwrapper .php

Offline

 

#3 04-06-2008 10:26:03

frwjd
Member
From: Lancaster, England
Registered: 02-08-2004
Posts: 219
Website

Re: .htaccess file

thanks Dave

That works without SEO enabled but not with SEO turned on. Any ideas as to the code I need to add with SEO enabled?

thanks again

Offline

 

#4 04-06-2008 10:32:18

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

Re: .htaccess file

Hmm, I would have thought that would have helped.  Hard to guess without you enabling it so we can get a better idea of what's happening.

Actually, put the ,L back on the 301 rule and leave the other line I added there.  The only time that 301 should be needed and hit is if someone comes in from a different URL.  Since you have the base URL configured correctly all of the URLs in the store should be coming out correctly and end up hitting the CCP rewrite rule.

Code:

RewriteEngine on
RewriteCond %{HTTP_HOST} ^french-regional-wines.co.uk$ [OR]
RewriteCond %{HTTP_HOST} ^www.french-regional-wines.co.uk$
RewriteRule ^/?$ http://www.french-regional-wines.co.uk/khxc/ [R=301,L]
RewriteRule ^khxc/(.*)-(.*)/(.*)\.html khxc/index.php?app=$1&ns=$2&ref=$3 [L,PT]
# Use PHP5CGI as default
AddHandler fcgid-script .php
FCGIWrapper /usr/local/cpanel/cgi-sys/fcgiwrapper .php

Offline

 

#5 04-06-2008 10:46:09

frwjd
Member
From: Lancaster, England
Registered: 02-08-2004
Posts: 219
Website

Re: .htaccess file

thanks again Dave

I have put the last code posted into my .htaccess file and have turned SEO on.
If you look at wwwfrench-regional-wines.co.uk now you can see the links in the left hand menu are wrong and result in error codes if clicked.

thanks

John

Offline

 

#6 04-06-2008 11:06:17

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

Re: .htaccess file

That's very odd.  The only thing they're missing is the directory (khxc) but the base URL is correct and includes the /khxc so the links should be getting built correctly too.  We'll have to see if someone better at rewrite rules sees this.  I'm not sure what else to try I'm afraid.

Offline

 

#7 04-06-2008 11:08:11

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

Re: .htaccess file

The SEO style links just fine when the khxc is added so it almost has to be related to htaccess.

Offline

 

#8 04-06-2008 11:10:50

frwjd
Member
From: Lancaster, England
Registered: 02-08-2004
Posts: 219
Website

Re: .htaccess file

ok Dave sincere thanks for your time and trouble.

It has been driving me daft for weeks, I only realised that it was the .htaccess file today. I have lost count of the number of times I've reinstalled everything.

thanks

John

Offline

 

#9 04-06-2008 11:19:53

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

Re: .htaccess file

I've pinged another member who's better at rewrite rules than I am and asked him to take a look at this thread.  Please leave SEO enabled for now if you can.

Offline

 

#10 04-06-2008 11:30:15

frwjd
Member
From: Lancaster, England
Registered: 02-08-2004
Posts: 219
Website

Re: .htaccess file

thanks Dave - will do. I'm just changing menus etc

Offline

 

#11 04-06-2008 15:54:53

frwjd
Member
From: Lancaster, England
Registered: 02-08-2004
Posts: 219
Website

Re: .htaccess file

I'm just going to have another go at this from scratch - re-installing the software (again). I have no doubt that I have got something very simple wrong - I usually do!

Offline

 

#12 04-06-2008 16:25:28

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

Re: .htaccess file

No no no, there is nothing wrong with your installation!

Offline

 

#13 04-06-2008 17:40:55

frwjd
Member
From: Lancaster, England
Registered: 02-08-2004
Posts: 219
Website

Re: .htaccess file

Dave

I had missed one vital part of the SEO process - I hadn't put the khxc directory in my root. I have now but nothing has changed - the links are still wrong.

It's getting late here and it's been a long, long day so I'm going to et some sleep soon.

Here is the current status

both the khxc and khxc_private are installed in my root directory.
SEO is enabled
My root .htaccess file is :-

RewriteEngine on
RewriteCond %{HTTP_HOST} ^french-regional-wines.co.uk$ [OR]
RewriteCond %{HTTP_HOST} ^www.french-regional-wines.co.uk$
RewriteRule ^/?$ http://www.french-regional-wines.co.uk/khxc/ [R=301,L]
RewriteRule ^khxc/(.*)-(.*)/(.*)\.html khxc/index.php?app=$1&ns=$2&ref=$3 [L,PT]# Use PHP5CGI as default
AddHandler fcgid-script .php
FCGIWrapper /usr/local/cpanel/cgi-sys/fcgiwrapper .php

url is wwwfrench-regional-wines.co.uk

many thanks again for persevering with this

John

Last edited by frwjd (04-06-2008 17:43:56)

Offline

 

#14 04-10-2008 13:40:33

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

Re: .htaccess file

Did you get the SEO working?


Mike Perks
Linux CD Shop - /shop for Linux distributions

ReviewLinux.Com - Linux OS News & Review Site

Offline

 

#15 05-10-2008 17:14:33

frwjd
Member
From: Lancaster, England
Registered: 02-08-2004
Posts: 219
Website

Re: .htaccess file

Hi

Just seen your reply - no I didn't, very disappointed, pretty pointless software without SEO enabled. I will try again in a couple of weeks but if it doesn't work will have to consider ditching ccp.

Offline

 

Board footer