RewriteCond %{THE_REQUEST} /([a-z-/]*)\?yclid= [NC]
RewriteRule ^(.*)$ https://%{HTTP_HOST}/%1 [R=301,QSD,L]
#
# If the requested path and file is not /index.php and the request
# has not already been internally rewritten to the index.php script
RewriteCond %{REQUEST_URI} !^/index\.php
# and the requested path and file doesn't directly match a physical file
RewriteCond %{REQUEST_FILENAME} !-f
# and the requested path and file doesn't directly match a physical folder
RewriteCond %{REQUEST_FILENAME} !-d
# internally rewrite the request to the index.php script
RewriteRule .* index.php [L]
#
##Ускорение загрузки сайта
##Gzip сжатие с помощью модуля mod_deflate - начало
<ifModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/html text/plain text/xml application/xml application/xhtml+xml text/css text/javascript application/javascript application/x-javascript
</ifModule>
##Gzip сжатие с помощью модуля mod_deflate - конец
##Gzip сжатие с помощью модуля mod_gzip - начало
<IfModule mod_gzip.c>
mod_gzip_on Yes
mod_gzip_dechunk Yes
mod_gzip_item_include file \.(html?|txt|css|js|php|pl)$
mod_gzip_item_include mime ^text\.*
mod_gzip_item_include mime ^application/x-javascript.*
mod_gzip_item_include mime ^application/x-font-woff.*
mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*
</IfModule>
##Gzip сжатие с помощью модуля mod_gzip - конец
## Настройки хостинга - начало
<ifModule mod_php.c>
php_value register_globals 0
php_value safe_mode 0
php_value allow_url_fopen 0
php_value display_errors 0
php_value file_uploads 1
php_value magic_quotes_gpc 1
php_value magic_quotes_runtime 0
php_value upload_max_filesize 20M
php_value post_max_size 10M
php_value max_execution_time 100
php_flag register_globals Off
php_flag display_errors Off
php_flag file_uploads On
php_flag allow_url_fopen off
php_flag magic_quotes_gpc On
php_flag magic_quotes_runtime Off
</ifModule>
## Настройки хостинга - конец
## Правила обработки запросов для блокировки распространенных эксплоитов - начало
RewriteCond %{QUERY_STRING} proc/self/environ [OR]
RewriteCond %{QUERY_STRING} mosConfig_[a-zA-Z_]{1,21}(=|\%3D) [OR]
RewriteCond %{QUERY_STRING} base64_(en|de)code\(.*\) [OR]
RewriteCond %{QUERY_STRING} (<|%3C).*script.*(>|%3E) [NC,OR]
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
RewriteRule .* index.php [F]
## Правила обработки запросов для блокировки распространенных эксплоитов - конец
##Блокировка прямого доступа к ядру - начало
RewriteCond %{REQUEST_FILENAME} -f
RewriteCond %{REQUEST_URI} \.php|\.ini|\.xml [NC]
RewriteCond %{REQUEST_URI} \/component\/ [OR]
RewriteCond %{REQUEST_URI} ^\/includes\/|^\/administrator\/includes\/ [OR]
RewriteCond %{REQUEST_URI} \/language\/ [OR]
RewriteCond %{REQUEST_URI} \/libraries\/ [OR]
RewriteCond %{REQUEST_URI} \/plugins\/ [OR]
RewriteCond %{REQUEST_URI} \/cli\/
RewriteRule ^(.*)$ index.php [R=404,L]
##Блокировка прямого доступа к ядру - конец
##Блокировка MySQL инъекций - начало
RewriteCond %{query_string} concat.*\( [NC,OR]
RewriteCond %{query_string} union.*select.*\( [NC,OR]
RewriteCond %{query_string} union.*all.*select [NC]
RewriteRule ^(.*)$ index.php [F,L]
##Блокировка MySQL инъекций - конец
##Блокировка файловых инъекций - начало
RewriteCond %{REQUEST_METHOD} GET
RewriteCond %{QUERY_STRING} [a-zA-Z0-9_]=http:// [OR]
RewriteCond %{QUERY_STRING} [a-zA-Z0-9_]=(\.\.//?)+ [OR]
RewriteCond %{QUERY_STRING} [a-zA-Z0-9_]=/([a-z0-9_.]//?)+ [NC]
RewriteRule .* - [F]
##Блокировка файловых инъекций -конец
## End - Joomla! core SEF Section.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^.]+)$ $1.php [NC,L]
# 301 --- https://okna-psk.ru/80-123 => https://okna-psk.ru/
RewriteRule ^80\-123$ /? [L,R=301]
# 301 --- https://okna-psk.ru/nashi-raboti/kategoriya/glavnaya => https://okna-psk.ru
RewriteRule ^nashi\-raboti/kategoriya/glavnaya$ /? [L,R=301]
Redirect 301 https://okna-psk.ru/nashi-raboti/kategoriya/glavnaya https://okna-psk.ru
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE text/javascript
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE image/x-icon
AddOutputFilterByType DEFLATE image/svg+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/font
AddOutputFilterByType DEFLATE application/font-truetype
AddOutputFilterByType DEFLATE application/font-ttf
AddOutputFilterByType DEFLATE application/font-otf
AddOutputFilterByType DEFLATE application/font-opentype
AddOutputFilterByType DEFLATE application/font-woff
AddOutputFilterByType DEFLATE application/font-woff2
AddOutputFilterByType DEFLATE application/vnd.ms-fontobject
AddOutputFilterByType DEFLATE font/ttf
AddOutputFilterByType DEFLATE font/otf
AddOutputFilterByType DEFLATE font/opentype
AddOutputFilterByType DEFLATE font/woff
AddOutputFilterByType DEFLATE font/woff2
# GZip Compression
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
</IfModule>
## END JSPEED OPTIMIZATIONS ##
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/html text/plain text/xml application/xml application/xhtml+xml text/javascript text/css application/x-javascript
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4.0[678] no-gzip
BrowserMatch bMSIE !no-gzip !gzip-only-text/html
<ifmodule mod_gzip.c>
mod_gzip_on Yes
mod_gzip_item_include file .js$
mod_gzip_item_include file .css$ </IfModule>
</IfModule>
<IfModule mod_autoindex.c>
IndexIgnore *
</IfModule>
<script>
jQuery('#modal').on('show.bs.modal', function (event) {
var button = jQuery(event.relatedTarget)
var recipient = button.data('whatever')
var modal = jQuery(this)
modal.find('.modal-title').html(recipient)
console.log(button);
console.log(recipient);
console.log(modal);
})
</script>
<button class="mt-2 mb-2 btn btn-primary" type="button" data-toggle="modal" data-target="#modal" data-whatever="Купить в один клик">Купить в один клик</button>
<button class="mt-2 mb-2 btn btn-primary" type="button" data-toggle="modal" data-target="#modal" data-whatever="Купить">Купить</button>
<button class="mt-2 mb-2 btn btn-primary" type="button" data-toggle="modal" data-target="#modal">Test</button>
<button class="mt-2 mb-2 btn" type="button" data-toggle="modal" data-target="#modal" data-whatever="Ващьпе не покупать">Ващьпе не покупать</button>
<div class="modal fade" id="modal" tabindex="-1" role="dialog">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="call-category">testovy</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<p>Modal body text goes here.</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary">Save changes</button>
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
jQuery('#modal').on('show.bs.modal', function (event) {
var button = jQuery(event.relatedTarget)
var recipient = button.data('whatever')
var modal = jQuery(this)
modal.find('.modal-title').text(recipient)
})
Если кому понадобится решение постом выше.