Ver código fonte

robots.txt blocks some images for Google search.

seavenois 10 anos atrás
pai
commit
4486b4db6c
2 arquivos alterados com 13 adições e 3 exclusões
  1. 7 2
      www-admin/functions.php
  2. 6 1
      www/robots.txt

+ 7 - 2
www-admin/functions.php

@@ -230,17 +230,22 @@
 			$_SESSION['name'] = $r['username'];
 			return true;
 		}
-		else
+		else{
+			error_log("Invalid login. username = $_SESSION[name], id = $_SESSION[id]");
 			return false;
+		}
 	}
 	
 	function checkSession($con){
 		session_start(['cookie_lifetime' => 1800,]);
 		$qr = mysqli_query($con, "SELECT id FROM user WHERE id = '$_SESSION[id]' AND md5(salt) = '$_SESSION[salt]';");
+		//error_log("SELECT id FROM user WHERE id = '$_SESSION[id]' AND md5(salt) = '$_SESSION[salt]';");
 		if (mysqli_num_rows($qr) == 1)
 			return true;
-		else
+		else{
 			return false;
+			error_log("Invalid session. username = $_SESSION[name], id = $_SESSION[id]");
+		}
 	}
 	
 

+ 6 - 1
www/robots.txt

@@ -14,5 +14,10 @@ Disallow: /lang/
 Disallow: /functions.php
 Disallow: /langtranslate.php
 
+User-agent: Googlebot-Image
+Disallow: /img/spo/
+Disallow: /img/social/
+Disallow: /img/misc/
 
-Sitemap: http://margolariak.es/sitemap.xml
+
+Sitemap: http://margolariak.com/sitemap.xml