First commit

Change-Id: I8fa91dda4732b393f3f4642137e18b4a7b0c7b74
diff --git a/.gitreview b/.gitreview
new file mode 100644
index 0000000..737f551
--- /dev/null
+++ b/.gitreview
@@ -0,0 +1,4 @@
+[gerrit]
+host=gerrit.avm99963.com
+project=gerrit-avatars
+defaultbranch=main
diff --git a/.htaccess b/.htaccess
new file mode 100644
index 0000000..b026a93
--- /dev/null
+++ b/.htaccess
@@ -0,0 +1,2 @@
+RewriteEngine On
+RewriteRule ^/?avatar/([^/]+)$ avatar.php?username=$1
diff --git a/avatar.php b/avatar.php
new file mode 100644
index 0000000..aec678e
--- /dev/null
+++ b/avatar.php
@@ -0,0 +1,11 @@
+<?php
+require('config_avatars.php');
+
+$username = $_GET['username'] ?? null;
+
+if (!array_key_exists($username, $USERS)) {
+  http_response_code(404);
+  exit();
+}
+
+header('Location: '.$USERS[$username]);
diff --git a/config_avatars.php b/config_avatars.php
new file mode 100644
index 0000000..27319c9
--- /dev/null
+++ b/config_avatars.php
@@ -0,0 +1,6 @@
+<?php
+// Avatars definitions
+$USERS = [
+  'avm99963' => 'https://www.avm99963.com/images/avatar.jpg',
+  // Add your avatar above!
+];
diff --git a/index.html b/index.html
new file mode 100644
index 0000000..e556e05
--- /dev/null
+++ b/index.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<head>
+  <meta charset="utf-8">
+  <meta name="robots" content="noindex">
+  <title>Gerrit avatars</title>
+</head>
+<body>
+  In order to modify/add your avatar, submit a change to the
+  <code>config_avatars.php</code> file in the
+  <a href="https://gerrit.avm99963.com/admin/repos/gerrit-avatars">gerrit-avatars</a>
+  repository.
+
+  You can see the current list of avatars
+  <a href="https://gerrit.avm99963.com/plugins/gitiles/gerrit-avatars/+/HEAD/config_avatars.php">here</a>.
+</body>
diff --git a/robots.txt b/robots.txt
new file mode 100644
index 0000000..cd74adb
--- /dev/null
+++ b/robots.txt
@@ -0,0 +1,2 @@
+User-agent: *
+Disallow: /avatars/*