Skip to content

Instantly share code, notes, and snippets.

@mnoskov
mnoskov / insales_sync.js
Last active November 8, 2022 03:45
VK Dynamic Retargeting INSALES
// Просмотр товара:
// Добавить в шаблон "product.liquid" код
<script>
$(window).load(function() {
var prices = [<Список идентификаторов прайс-листов>];
for (var i = 0; i < prices.length; i++) {
VK.Retargeting.ProductEvent(prices[i], 'view_product', {
products: [
#redirect http to https
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteCond %{HTTP_HOST} ^(.*)$
RewriteRule ^(.*)$ https://%1/$1 [R=301,L]
# without www all domains
RewriteCond %{HTTP_HOST} .
RewriteCond %{HTTP_HOST} !^domain\.ru$ [NC]
RewriteRule ^(.*)$ https://domain.ru/$1 [R=301,L]
@mnoskov
mnoskov / .htaccess
Last active March 3, 2020 18:35
Запись всех POST-запросов к сайту
php_value open_basedir "/path:/tmp"
php_value mail.add_x_header 1
php_value mail.log /path/mail.log
php_value auto_prepend_file /path/postlogger.php