# For full documentation and other suggested options, please see
# http://svn.modxcms.com/docs/display/MODx096/Friendly+URL+Solutions
# including for unexpected logouts in multi-server/cloud environments
# and especially for the first three commented out rules
RewriteEngine on
# The Friendly URLs part
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
RewriteCond %{REQUEST_URI} ^(.*?)\/{2,}(.*?)$
RewriteRule . %1/%2 [L,R=301]
RewriteCond %{THE_REQUEST} //
RewriteRule .* /$0 [R=301,L]
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ https://%1/$1 [R=301,L]
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [NC,R=301,L]
#php_flag register_globals Off
#AddDefaultCharset utf-8
#php_value date.timezone Europe/Moscow
Options +FollowSymlinks
RewriteEngine On
RewriteBase /
<ifModule mod_gzip.c>
mod_gzip_on Yes
mod_gzip_dechunk Yes
mod_gzip_item_include file .(html|img|flv|gif|jpg|jpeg|png|ico|swf|js|css|webp|pdf|txt|php|pl)$
mod_gzip_item_include handler ^cgi-script$
mod_gzip_item_include mime ^html/.*
mod_gzip_item_include mime ^text/.*
mod_gzip_item_include mime ^application/x-javascript.*
mod_gzip_item_exclude mime ^image/.*
mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*
</ifModule>
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_ACCEPT} image/webp
RewriteCond %{REQUEST_URI} (.*)(\.(jpe?g|png))$
RewriteCond %{DOCUMENT_ROOT}/%1\.webp -f
RewriteRule .* %1\.webp [L,T=image/webp]
</IfModule>
<IfModule mod_headers.c>
Header append Vary Accept env=REDIRECT_accept
</IfModule>
<IfModule mod_mime.c>
AddType image/webp .webp
</IfModule>
<FilesMatch ".(html|img|flv|gif|jpg|jpeg|png|ico|swf|js|css|webp|pdf|txt|php|pl)$">
Header set Cache-Control "max-age=10368000"
</FilesMatch>
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType text/url "access plus 180 days"
</IfModule>
# Fix Apache internal dummy connections from breaking [(site_url)] cache
RewriteCond %{HTTP_USER_AGENT} ^.*internal\ dummy\ connection.*$ [NC]
RewriteRule .* - [F,L]
# Exclude /assets and /manager directories and images from rewrite rules
RewriteRule ^(manager|assets)/*$ - [L]
RewriteRule \.(jpg|jpeg|png|gif|ico)$ - [L]
# For Friendly URLs
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
# Reduce server overhead by enabling output compression if supported.
#php_flag zlib.output_compression On
#php_value zlib.output_compression_level 5
RewriteEngine on
RewriteRule ^sitemap\.xml$ /google_sitemap.php [L]
[[++site_url]]
<link href="[[++site_url]][[~[[*id]]]]" rel="canonical">
И с ним у главной такая же беда. <div class="modal closed" id="modal" aria-hidden="true" role="dialog">
<button class="close-button" id="close-button">Закрыть</button>
<div class="modal-guts" role="document">
<div class="form__wrapper">
<form id="form-contact" method="POST" class="form-element" autocomplete="off">
<p class="form-title">вызвать компьютерного мастера на дом или в офис<br>в Москве | МО</p>
<p class="form-message"></p>
<input name="name" type="text" class="form-input__name" tabindex="0" placeholder="Введите ваше имя" required>
<input name="phone" id="phone" type="tel" class="form-input__phone" tabindex="0" placeholder="Введите ваш телефон">
<input name="theme" type="hidden" class="form-input__theme" value="Заявка с сайта">
<input type="submit" class="form-input__button" onclick="ym(52794661, 'reachGoal', 'zayavka'); return true;" value="Жду звонка!">
</form>
</div>
</div>
</div>
<script>
var modal = document.querySelector("#modal"),
closeButton = document.querySelector("#close-button");
closeButton.addEventListener("click", function() {
modal.classList.toggle("closed");
modalOverlay.classList.toggle("closed");
});
</script>
var modal = document.querySelector("#modal"),
closeButton = document.querySelector("#close-button");
closeButton.addEventListener("click", function() {
modal.classList.toggle("closed");
modalOverlay.classList.toggle("closed");
});
const openButtons = document.querySelectorAll(".modal-btn");
openButtons.forEach(btn=> {
btn.addEventListener("click", () => {
modal.classList.toggle("closed");
modalOverlay.classList.toggle("closed");
});
})
const modalOverlay = document.querySelector(".modal-overlay");
modalOverlay.forEach(btn=> {
modalOverlay.addEventListener("click", () => {
modal.classList.toggle("closed");
modalOverlay.classList.toggle("closed");
});
})
<div class="modal-btn call-computer-master"><p>вызвать мастера на дом</p></div>
const openButtons = document.querySelectorAll(".modal-btn");
openButtons.forEach(btn=> {
btn.addEventListener("click", () => {
modal.classList.toggle("closed");
modalOverlay.classList.toggle("closed");
});
})
const modalOverlay = document.querySelector(".modal-overlay");
modalOverlay.forEach(btn=> {
modalOverlay.addEventListener("click", () => {
modal.classList.toggle("closed");
modalOverlay.classList.toggle("closed");
});
})
const closeButton = document.querySelectorAll(".close-button");
closeButton.forEach(btn=> {
closeButton.addEventListener("click", () => {
modal.classList.toggle("closed");
modalOverlay.classList.toggle("closed");
});
})
<div class="modal-overlay closed"></div>
<div class="modal-btn closed" aria-hidden="true" role="dialog">
<button class="close-button" title="">Закрыть</button>
<div class="modal-guts" role="document">
<div class="form__wrapper">
<form id="form-contact" method="POST" class="form-element" autocomplete="off">
<p class="form-title" style="color:#191970">вызвать компьютерного мастера на дом или в офис<br />в Москве | МО</p>
<p class="form-message"></p>
<input name="name" type="text" class="form-input__name" tabindex="0" placeholder="Введите ваше имя" required>
<input name="phone" id="phone" type="tel" class="form-input__phone" tabindex="0" placeholder="Введите ваш телефон" required>
<input name="theme" type="hidden" class="form-input__theme" value="Заявка с сайта">
<input type="submit" style="color:#191970" class="form-input__button" onclick="ym(52794661, 'reachGoal', 'zayavka'); return true;" value="Жду звонка!">
</form>
</div>
</div>
</div>
$(document).ready(function () {
$(".form-element").submit(function () {
var formID = $(this).attr('id');
var formNm = $('#' + formID);
var message = $(formNm).find(".form-message");
var formTitle = $(formNm).find(".form-title");
$.ajax({
type: "POST",
url: 'https://blm21.com/callback-form/telegramform/php/send-message-to-telegram.php',
data: formNm.serialize(),
success: function (data) {
// Вывод сообщения об успешной отправке
message.html(data);
formTitle.css("display","none");
$('input','.form-element').not(':input[type=submit], :input[type=hidden], :reset').val('');
$(".form-element input[type=submit]").attr('disabled','disabled');
/* setTimeout(function(){
formTitle.css("display","block");
message.html('');
$(".form-element input[type=submit]").attr('enabled','enabled');
}, 30000); */
},
error: function (jqXHR, text, error) {
// Вывод сообщения об ошибке отправки
message.html(error);
formTitle.css("display","none");
setTimeout(function(){
formTitle.css("display","block");
message.html('');
$('input').not(':input[type=submit], :input[type=hidden]').val('');
}, 3000);
}
});
return false;
});
});
const openButtons = document.querySelectorAll(".modal-btn"),
modalOverlay = document.querySelectorAll(".modal-overlay"),
closeButton = document.querySelectorAll(".close-button"),
openButton = document.querySelectorAll(".all-computer-master");
openButton2 = document.querySelectorAll(".call-pc-master");
openButton3 = document.querySelectorAll(".call-computer-wizard");
openButton4 = document.querySelectorAll(".phone-computer-wizard");
openButton5 = document.querySelectorAll(".computer-wizard-call");
openButton6 = document.querySelectorAll(".call-pc-wizard");
openButtons.forEach(btn=> {
closeButton.addEventListener("click", () => {
modal.classList.toggle("closed");
modalOverlay.classList.toggle("closed");
});
modalOverlay.addEventListener("click", () => {
modal.classList.toggle("closed");
modalOverlay.classList.toggle("closed");
});
openButton.addEventListener("click", () => {
modal.classList.toggle("closed");
modalOverlay.classList.toggle("closed");
});
openButton2.addEventListener("click", () => {
modal.classList.toggle("closed");
modalOverlay.classList.toggle("closed");
});
openButton3.addEventListener("click", () => {
modal.classList.toggle("closed");
modalOverlay.classList.toggle("closed");
});
openButton4.addEventListener("click", () => {
modal.classList.toggle("closed");
modalOverlay.classList.toggle("closed");
});
openButton5.addEventListener("click", () => {
modal.classList.toggle("closed");
modalOverlay.classList.toggle("closed");
});
openButton6.addEventListener("click", () => {
modal.classList.toggle("closed");
modalOverlay.classList.toggle("closed");
});
$(function(){
$("#phone").mask("+7 (999) 999-99-99");
});
})
<div id="phone-computer-wizard" class="phone-computer-wizard"><p>вызывайте мастера</p></div>
<div class="modal-overlay closed" id="modal-overlay"></div>
<div class="modal closed" id="modal" aria-hidden="true" role="dialog">
<button class="close-button" id="close-button">Закрыть</button>
<div class="modal-guts" role="document">
<div class="form__wrapper">
<form id="form-contact" method="POST" class="form-element" autocomplete="off">
<p class="form-title">вызвать компьютерного мастера на дом или в офис<br>в Москве | МО</p>
<p class="form-message"></p>
<input name="name" type="text" class="form-input__name" tabindex="0" placeholder="Введите ваше имя" required>
<input name="phone" id="phone" type="tel" class="form-input__phone" tabindex="0" placeholder="Введите ваш телефон" required>
<input name="theme" type="hidden" class="form-input__theme" value="Заявка с сайта">
<input type="submit" class="form-input__button" onclick="ym(52794661, 'reachGoal', 'zayavka'); return true;" value="Жду звонка!">
</form>
</div>
</div>
</div>