Skip to content

Instantly share code, notes, and snippets.

View akroii's full-sized avatar
🙃

Andreas Kroll akroii

🙃
  • Proverbs 6,6-8
  • 06:51 (UTC +01:00)
View GitHub Profile
@akroii
akroii / gist:805b50afcc95b00169e883c82a18a3a8
Created September 17, 2017 08:55
Exclude google verification html from beeing redirected
RewriteEngine on
RewriteCond %{REQUEST_URI} !^/google12345abc\.html$ [NC]
RewriteCond %{HTTP_USER_AGENT} (googlebot|bingbot|Baiduspider) [NC]
RewriteRule .* - [R=403,L]
-- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: :3306
-- Erstellungszeit: 07. Nov 2017 um 09:58
-- Server-Version: 10.1.28-MariaDB-1~xenial
-- PHP-Version: 7.1.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
-- phpMyAdmin SQL Dump
-- version 4.7.3
-- https://www.phpmyadmin.net/
--
-- Host: localhost:8889
-- Erstellungszeit: 21. Dez 2017 um 09:42
-- Server-Version: 5.6.35
-- PHP-Version: 7.1.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
RewriteEngine On
RewriteCond %{HTTP_USER_AGENT} AltaVista [OR]
RewriteCond %{HTTP_USER_AGENT} Googlebot [OR]
RewriteCond %{HTTP_USER_AGENT} msnbot [OR]
RewriteCond %{HTTP_USER_AGENT} ^bingbot/.* [OR,NC]
RewriteCond %{HTTP_USER_AGENT} Slurp
RewriteRule ^.*$ "https\:\/\/sdfsdf.sdfsdfdsf\.rocks" [R=301,L]
@akroii
akroii / .htaccess
Created February 20, 2018 07:13
restricted access
<IfModule !mod_authz_core.c>
Order deny,allow
Deny from all
Allow from 93.222
Allow from 217.7
Allow from 217.89
</IfModule>
<IfModule mod_authz_core.c>
Require ip 93.222
Require ip 217.7
@akroii
akroii / .htaccess
Last active November 25, 2019 07:05
Redirect to SSL, based on a condition
#works sometimes
RewriteCond %{HTTPS} off
RewriteCond %{HTTP_HOST} vvvvvv\.de$ [NC]
RewriteRule ^https://www.vvvvvv.de%{REQUEST_URI} [R=301,L,NE]
#redirect SPECIFIC host
RewriteCond %{HTTP_HOST} ^vvvvvv\.de [NC]
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://www.%{HTTP_HOST}%{REQUEST_URI}
RedirectMatch 302 (?i)^/Autodiscover/(.*)$ https://autodiscover.xxxxx.de/Autodiscover/$1
<?php
if ($this->download) {
$objFiles = \FilesModel::findMultipleByIds(deserialize($this->download));?>
<div class="icon- product_enclosure enclosure spaceAbove-large">
<ul class="unstyled">
<?php
while ($objFiles->next()) {
echo '<li> <a onclick="ga(\'send\', \'event\', \'Download\', \''.$objFiles->name.' - PDF Dokument\');'.$objFiles->name.' - PDF Dokument\');" title="Die Datei '.$objFiles->name.' herunterladen" target="_blank" href="'.$objFiles->path.'">'.$objFiles->name.'</a></li>';
}?>
</ul>
@akroii
akroii / BLOB into singleSRC
Last active September 29, 2021 07:45
transform BLOB into singleSRC
<?php
if ($this->bild) {
$objFiles = \FilesModel::findByPk($this->bild);
echo '<figure class="image_container">
<picture>
<img src="'.$objFiles->path.'" title="'.$objFiles->name.'" />
</picture>
</figure>';
}
?>