Welcome Guest, Not a member yet? Register   Sign In
Help with google statu verification

Hi all,

First of all, sorry for my very bad english !

I have many site running on CI for our clients and all work fine exept for one site that can't be validate by google webmaster tools.

This site use a massive routes based system (like our others sites...).

The problem is that when I try to verify the site on the google webmaster tools by uploading an HTML file, google return this error :

We’ve detected that your 404 (file not found) error page returns a status of 200 (Success) in the header.

This issue is related into this other topics :


Since 2 weeks that I try to solve this, I turned my .htaccess file into this :

Quote:#RewriteEngine On
RewriteCond %{REQUEST_URI} !^(/index\.php|/img|/error|/pdf|/flash|/js|/css|/greybox|/xml|/geolocalisation|/voeux2008|/upload|/google-map|/flux-rss|/epub|/bandeau|/atterrissage|/sitemap|/google0544f5aefaf6a57d\.html|/newsletter|/reservation|/robots\.txt|/favicon\.ico|/*\.swf)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ /index.php?$1 [L]

Or into this (same issue) :

Quote:# Turn on the Rewrite Engine
Options +FollowSymLinks
RewriteEngine On

# If the file or directory exists, show it
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d

RewriteRule ^(.+) - [PT,L]

# Blank queries get sent to the index
RewriteRule ^$ index.php? [L]

# All other queries get sent to the index as index.php/whatever
RewriteRule ^(.*)$ index.php?/$1 [L]

The google HTML file is accessible by a browser BUT NOT by the google bot !

After many tests, It seems that :

RewriteRule ^$ index.php? [L] is the problem. Without this line, the bot successfully validate the site but the site (roote based doesn't work ! 404 everywhere, routes are broken).

My routes are based on the user guide here : http://ellislab.com/codeigniter/user-gui...uting.html

Also, this should prevent the redirect to CI :

# If the file or directory exists, show it
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d

But it doesn't work...

Is anobody have an idea ?

I can provide more informations if needed...

Thank's all

No suggestions ?

Found the solution !

Basically, in system/application/errors/error_404.php

The :

<?php header("HTTP/1.1 404 Not Found"); ?>

Have been removed for an unknown reason !

We looked around the htaccess rules since many weeks... xD

Theme © iAndrew 2016 - Forum software by © MyBB