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.
Pages: 1 2
Please can you confirm if the cart should return a "404 page not found error" if the url does not exist and you arrive at the page that states "The page requested could not be located. Please make a selection from the menu to continue."
I tried this with a non-existent url "http://www.quasarelectronics.co.uk/thispagedoesnotexist" and then tried the same url in google webmaster using Fetch as Google. Google returns a success result as offers to add it to the indexed pages.
I would have thought this should return a 404 page error otherwise Google will index all these page not found error and create a lot of duplicate content problems.
Offline
I've got this on the list todo. The code I have right now for this is editing the file {private}/apps/cms/CMS_Content/CMS_Content.php. In the display() function, replace:
$this->CORE_Display->include_file('cms','pagenotfound.php');
With:
$this->globals('core_display.suppress_skin',1); header('HTTP/1.1 404 Not Found'); header('Location: ' . $this->CORE_Display->link_namespace('cms','display',array('ref'=>'splash'))); return 1;
Offline
I tried the fix and then got google to fetch another fictitious page (http://www.quasarelectronics.co.uk/morenonsense) but it still thinks its a good url.
I also checked using http://www.searchenginepromotionhelp.co … hecker.php and this reports the code being returned is a 302.
Last edited by sdn (02-27-2013 15:41:55)
Offline
For whatever reason your server is pushing the 404 error code over to a 302. I just checked as well. What happens when you comment out or remove this line:
header('Location: ' . $this->CORE_Display->link_namespace('cms','display',array('ref'=>'splash')));
??
Offline
That works perfectly. Both Google and the other site now return a 404 error.
That will make Google much happier.
BTW I fixed our htaccess file (I think). It needed to have \ added to the redirects like this:
RewriteRule ^admin\/c\-us\.htm$ "http\:\/\/www\.quasarelectronics\.co\.uk\/Contact" [R=301,L]
Strangely google and godaddy SEO are still reporting some server errors although we upgraded to a considerably more expensive VPS package.
Thanks Nick
Last edited by sdn (02-28-2013 09:48:50)
Offline
No problem. Typically in .htaccess only a period (.) needs to be escaped in the first section of the rewrite rule. Therefore this is valid:
RewriteRule ^admin/c-us\.htm$ http://www.quasarelectronics.co.uk/Contact [L,R=301]
Offline
OK I will give that format a try. It will make our bloated htaccess file a bit smaller. I used cPanel to create an example rewrite and this is how it formatted it so I just followed that example to create the rest.
You might remember than the error caused was it adding ?COREseourl=/oldfilename.htm after all the page redirect urls. Of course Google helpfully indexed all of them giving loads of duplicate content problems so the 404 fix will flush those out of the system.
Last edited by sdn (02-28-2013 10:34:04)
Offline
One solution is to place a noindex tag in the header of the CCP nonexistant page. That will stop SE's from indexing the page yet show your customer something nice.
Offline
I spoke too soon on this. If the page does not exist you get a blank screen now. See http://www.quasarelectronics.co.uk/avsl … io-out.htm for details.
There are other cases that cause a 500 server error page to be returned e.g. http://www.quasarelectronics.com/mailman/create
Please can you advise soonest. I have also PMd you about the problems we have experienced.
Last edited by sdn (03-04-2013 02:45:13)
Offline
You may simply need to set up a 404 error page in your .htaccess file in order to avoid a blank screen for 404s. Or, uncomment the redirect line and instead redirect to a 404.html.
As far as the /mailman links not working, in your .htaccess you'll need to add this above the CCP8 rules:
RewriteRule ^mailman/(.*) mailman/$1 [L,PT]
Offline
This is still not working correctly.
If you add some gibberish after an Item/ or Category/ url CCP returns slighty different "index,follow" pages as below.
How to change these pages to "noindex,follow"?
Page Text: The item you selected cannot be viewed. Please make a selection from the menu to continue.
<title>Item Details</title>
<meta name="robots" content="index,follow" />
Page Text: There are no items to display which match your request. Please use the menu to continue.
<title>Category</title>
<meta name="robots" content="index,follow" />
Offline
We already had a "404.shtml" page but the line "ErrorDocument 404 /404.shtml" had dropped out of our htaccess file so added near the top under "Options All -Indexes".
The foot now looks like this:
RewriteRule ^index.php - [L,PT]
RewriteRule ^$ index.php?COREseourl=/ [L,PT]
RewriteRule ^/$ index.php?COREseourl=/ [L,PT]
RewriteRule ^sitemap\.xml utilities/sitemap.xml [L,PT]
RewriteRule ^rss\.xml utilities/rss.xml [L,PT]
RewriteCond %{REQUEST_URI} ^/
RewriteCond %{REQUEST_URI} !\.(xml|css|js|gif|jpg|jpeg|png|pdf)$ [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*) index.php?COREseourl=/$1 [L,PT]
RewriteRule ^mailman/(.*) mailman/$1 [L,PT]
RewriteCond %{QUERY_STRING} ^COREseourl$
RewriteRule ^(.*)$ /$1 [L,R=301]
I am afraid to say it still returns a 200 success code for a non-existent file in the CCP8 environment (like http://www.quasarelectronics.co.uk/Item … t-nonsense) but......
I have reincluded the CMS_content line you suggested I comment out "header('Location: ' . $this->CORE_Display->link_namespace('cms','display',array('ref'=>'404.shtml')));" and our custom 404 page is now displayed for a url like http://www.quasarelectronics.co.uk/nonsense.htm. So thats one problem fixed.
I also tried going back to the original "$this->CORE_Display->include_file('cms','pagenotfound.php');" version but this still returns a 200.
CMS_content.php is now:
$this->globals('core_display.suppress_skin',1);
header('HTTP/1.1 404 Not Found');
header('Location: ' . $this->CORE_Display->link_namespace('cms','display',array('ref'=>'404.shtml')));
return 1;
Can I raise a ticket and get your engineers to resolve this as it has been going on for weeks now and I really need it resolved.
Last edited by sdn (03-09-2013 02:51:17)
Offline
Change:
header('Location: ' . $this->CORE_Display->link_namespace('cms','display',array('ref'=>'404.shtml')));
To:
header('Location: http://www.quasarelectronics.co.uk/404.shtml');
Offline
I have done that and still the same page and 200 success code is returned. Code now reads:
$this->globals('core_display.suppress_skin',1);
header('HTTP/1.1 404 Not Found');
// header('Location: ' . $this->CORE_Display->link_namespace('cms','display',array('ref'=>'http://www.quasarelectronics.co.uk/404.shtml')));
header('Location: http://www.quasarelectronics.co.uk/404.shtml');
return 1;
Offline
Check with your host on this. You're issuing a 404 and printing the location of your 404 page. There's no reason it isn't working as far as I can tell.
Offline
The host has replied as follows:
"When we access the non-existent page normally, the server access logs show the below.
31.170.127.251 - - [25/Mar/2013:06:32:22 +0000] "GET /bvmhgmgm HTTP/1.1" 302 20 "-" "Mozilla/5.0 (Windows NT 6.1; rv:19.0) Gecko/20100101 Firefox/19.0"
31.170.127.251 - - [25/Mar/2013:06:32:23 +0000] "GET /404.shtml HTTP/1.1" 200 1175 "- " "Mozilla/5.0 (Windows NT 6.1; rv:19.0) Gecko/20100101 Firefox/19.0"
Here, you can see the first error code is returned as 302, but it shows the correct 404 page. Also after accessing the non-existent page through code checker, the same behavior was noticed. See the below logs.
69.56.174.178 - - [25/Mar/2013:06:30:47 +0000] "GET /afbsadhfhsdh HTTP/1.1" 302 - "http://www.searchenginepromotionhelp.com/" "Promotion_Tools_http_www.searchenginepromotionhelp.com"
69.56.174.178 - - [25/Mar/2013:06:30:47 +0000] "GET /404.shtml HTTP/1.1" 200 2821 "http://www.searchenginepromotionhelp.com/" "Promotion_Tools_http_www.searchenginepromotionhelp.com"
We would suggest you to ask your web developer regarding this and let us know if there is anything that needs changed on the server. We will do that for you."
Offline
I think the server is misconfigured. It should respond with a 404 and not a 302 on not found pages. According to your host's remarks, it never returns a 404 and always a 302.
Offline
I am going to trial a different hosting company in an attempt to solve this problem. Is there a preferred OS for CCP8 to run on? As our CCP8 software licence is registered to our current domain, will there be a problem if we try to pre-install it on the trial server prior to making the DNS changeover?
Last edited by sdn (04-01-2013 09:04:00)
Offline
(1) I always prefer Linux as opposed to Windows for speed/security reasons.
(2) Contact the custom shop with your current license key and a request for a matching dev key. When you get the dev key, make sure you enter that key in for the license key in the private config.php file on the test install.
Offline
I was thinking about the actual OS. The choices are:
CentOS 6 64-bit
CentOS 5 64-bit
Fedora 14 64-bit
Debian Squeeze 64-bit
Ubuntu 12.04 64-bit
Ubuntu 10.10 64-bit
Ubuntu 10.04 64-bit
Offline
All of those are good choices. We run RedHat on our servers, so I'd be partial to Fedora, but that's just me. I've had experience with Debian and Ubuntu as well and both are top notch.
Offline
I have still not resolved this 404 issue. Although the 404 page page appears it is reported as a 302 redirect with just the recommended lines you recommend for the htaccess file with CCP8.
If I rem out the line "RewriteRule ^(.*) index.php?COREseourl=/$1 [L,PT]" the server returns the correct 404 response.
Our server is running "CENTOS 6.4 x86_64 vmware – server1 WHM 11.36.0 (build 14)". This seems like a fairly standard setup to me.
I really need this problem sorted out as it is having a very detrimental effect on our search engine rankings.
Offline
The line you're commenting out is the main SEO URL rule. Without it SEO URLs will not work in the software. Can you please post the URL where you're experiencing the 302 issue?
Offline
Yes I realise that is the SEO rewrites line.
It will generate a 302 on any non-existent page outside the cart environemnt like http://www.quasarelectronics.co.uk/nosuchfile.htm
As well as Google telling me about soft 404s I use http://www.searchenginepromotionhelp.co … -response/ for testing.
Offline
Pages: 1 2