RewriteCond %{THE_REQUEST} "^[^ ]* .*?\.php[? ].*$"
RewriteRule .* - [L,R=404]
RewriteCond %{ENV:REDIRECT_STATUS} ^$
RewriteRule \.php - [L,R=404]
RewriteRule ^mailing\.html$ /index.php?mailing=1 [L]
RewriteRule ^balance\.html$ /index.php?balance=1 [L]
map $host $subdomain {
default "";
~^(.*)\.site\.com\.local$ $1;
}
server_name ~^(?<subdomain>.*)\.site\.com\.local$;
Player2\((\d+)
(?<=Player2\()\d+
Player2\(\K\d+
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ /$1 [L,R=301]
/$1
не хватает явного указания https://RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ https://%{HTTP_HOST}/$1 [L,R=301]
let result = vowelRegex.test(quoteSample); // Change this line
let result = quoteSample.match(vowelRegex);
$text = '
<p>one</p>
<p>two</p>
<p>three</p>
';
$text = preg_replace('#<p>.*?three.*?</p>#i', '', $text);
echo $text;
$text = '
<p>one</p> <p>two</p> <p>three</p>
';
$text = preg_replace('#<p>(?:(?!</p>).)*?three.*?</p>#i', '', $text);
echo $text;
https://site.ru
или https://%{HTTP_HOST}
RewriteCond %{THE_REQUEST} ^[^?]+//
RewriteRule (.*) https://%{HTTP_HOST}/$1 [R=301,L]
<Directory>
доступна только в server config, virtual host.<Directory not allowed here
AllowOverride None
на AllowOverride All
sudo a2enmod rewrite
sudo service apache2 restart
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^shop/catalog/(.*)$ /shop/catalog.php?category=$1 [L,NC]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^shop/(.*)$ /shop/tovar.php?id=$1 [L]
RewriteCond %{DOCUMENT_ROOT}/$1.php -f
RewriteRule ^(.*)$ $1.php [L]
Вот как ещё пример
aasg assg gsaa gggh
Мы ищем sgaa
Нам должно вывести aasg gsaa
\b(?=\w*s)(?=\w*g)(?=(\w*a){2})[sga]{4}\b
<FilesMatch "(?i)((\.tpl|\.ini|\.log|(?<!robots)\.txt))">
<FilesMatch "(?i)((\.tpl|\.ini|\.log|(?<!robots)\.txt))$">
*.init.js
файлы.