GetSimple Support Forum

Full Version: Google Verification methods
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,

since I use fancy urls, Google cannot recognize the file googlexxxxxxxx.html in my root any more, which is needed for Google Webmaster Tools site verification.

Is there a way to give Google that file, which seems to need the .html ending?

Another way would be to add a meta tag into the index file, like
<meta name="google-site-verification" content="..." />

But: how can I manage to do that (only in the index file)?

Thank you for your help!
I believe the google analytics plugin does this, the newer one.
(2014-10-15, 20:07:13)Hypertexter Wrote: [ -> ]since I use fancy urls, Google cannot recognize the file googlexxxxxxxx.html in my root any more, which is needed for Google Webmaster Tools site verification.

Is there a way to give Google that file, which seems to need the .html ending?

I have just checked one of my GS sites (fancy URLs, default GS .htaccess) where I have a google*.html file in its root, and can view it with my browser.

(2014-10-15, 20:07:13)Hypertexter Wrote: [ -> ]Another way would be to add a meta tag into the index file, like
<meta name="google-site-verification" content="..." />

But: how can I manage to do that (only in the index file)?

Code:
<?php if (return_page_slug()=='index') { ?>
<meta name="google-site-verification" content="..." />
<?php } ?>
Wonderful, thank you! The code worked immediately.

If your google.html works, you are happy :-)
But how come you can use the default .htaccess with fancy urls? I had to insert some rewrite rules for getting it really fancy...

@shawn_a:
I tried not to use Google Analytics because many people said it is evil (bad data protection).
I still dont get it, Why would it not be able to see .html files in root?
That is what RewriteCond %{REQUEST_FILENAME} !-f
is for
I have these entries in .htaccess:

Code:
RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
      RewriteRule /?([A-Za-z0-9_-]+)/?$ index.php?id=$1 [QSA,L]
yeah should be no problem creating directories or files in root, they should all be publicly accessible.
that rule says

if not an existing directory
if not an existing file
then rewrite to index.php?id=blargh

admin
theme
data
.htaccess
index.php
somefile.html
someotherfile.php
directory/somefile.php

these should all be accesible at http://example.com/webroot/somefile.html

unless you have something else blocking it
ahhhhhh
are you using apache 2.2?

read this
http://stackoverflow.com/questions/69790...ot-working
Yes, it is
Apache Version Apache/2.2.0 (Fedora)
Apache API Version 20051115
and PHP Version 5.3.29

But what you gave me to read has not really an effect if I read it, sorry Big Grin

Seems I have to add something to my .htaccess?
replace
Code:
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

with
Code:
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-f
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-d

and see if you have any luck
No! I had no luck at all:

"500 Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request."
That should be compatible with 2.2 unless you have a syntax error somehow.
Ill have to spin up a 2.2 dev and see.

I think this is only a problem on some configs, like certain virtual host setups.

you might also able to make a custom rule for now like
RewriteRule ^/googlexxxxxxx\.html$ - [L]
or
RewriteCond %{REQUEST_URI} !^/googlexxxxxxx\.html$
I tried
RewriteRule ^/googlexxxxxxx\.html$ - [L]
with the "googlexxxxxxx" including .html and not, and no one worked.