Hi there, My .htaccess file redirects (rewrites) all .html to .php I need to add Google's file in order to verify my account (Webmaster Tools) but it can't find the file because of my .htaccess. Options +FollowSymlinks RewriteEngine on rewritecond %{http_host} ^mydomain.com [nc] rewriterule ^(.*)$ http://www.mydomain.com/$1 [r=301,nc] rewritecond %{http_host} ^/index.html [nc] rewriterule ^(.*)$ http://www.mydomain.com/$1 [r=301,nc] RewriteRule ^(.*)\.html$ $1.php [NC] Code (markup): How can I solve this?
They offer two options: #1: create a google file. This sometimes works, but it will most likely cause problems in your case #2: add header code to all pages. This will most likely work for you If neither work for you, make sure that your htaccess is setup properly, because if the second doesn't work , then most likely no search engine will be able to access your website.
Won't work Google periodically retries to verify the site, so as soon as you put it back, you lose the 'validation' status. The best choice in something like this is a header tag
use the meta tag method. the html method seems a little iffy.. if works sometimes but not other times...
Add an exception to your rewrite rule. Try this: RewriteCond %{REQUEST_URI} !/forum Where forum is the place the enter the verify filename
Thanks for the info.. I will try that... Also i have put a sitemap in public_html/sitemap/sitemap.xml Will google be able to access that..How can i allow google to go in my website through .htaccess Please help
Simply insert below code. RewriteEngine On RewriteRule ^google149e37e6d0ddce9a.html$ - [L] RewriteRule ^([^/]*)\.html$ /index.php?page=$1 [L] Note:- Change file name "google149e37e6d0ddce9a" to yours... Thanks, Rakesh Patel http://divinewebtechnology.com/ Skype:- rakesh_patel33