location / {
try_files /public$uri /public$uri/ @php;
}
root C:/Winginx/home/localhost/public_html/public;
C:/web/html;
root C:/home/localhost/public_html/public;
[L]
^dir/index\.php$
, а ^component/content/article$
RewriteCond %{QUERY_STRING} ^layout=edit&id=88$
RewriteRule ^component/content/article$ https://xxx-xx.com.ua/posluhy-z-reyestratsiyi-transportu-otrymannya-posvidchennya-vodiya/? [R=301,L]
RewriteCond %{THE_REQUEST} " /component/content/article\?layout=edit&id=88 "
RewriteRule ^ https://xxx-xx.com.ua/posluhy-z-reyestratsiyi-transportu-otrymannya-posvidchennya-vodiya/? [R=301,L]
^
обозначает начало строки и без модификатора m
он не может совпасть с началом строки где-то посреди текста.js/file.js
, а должен быть полный путь от корня /html/js/file.js
[P]
httpd.apache.org/docs/2.4/rewrite/flags.html#flag_pRewriteRule ^(.*)$ http://site.ru/$1 [P]
RewriteRule ^(.*)$ http://site.ru/$1 [R=301,L]
RewriteEngine on
RewriteBase /
RewriteCond %{THE_REQUEST} " /index\.php\?q=([^ &]*)"
RewriteRule ^ https://site.ru/%1? [R=301,L]
RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^(.*)$ https://site.ru/$1 [R=301,L]
RewriteRule ^(.*)$ index.php?q=$1 [L]
RewriteEngine on
RewriteBase /
RewriteCond %{SERVER_PORT} !^443$
RewriteRule .* https://%{SERVER_NAME}%{REQUEST_URI} [R=301,L]
RewriteRule ^(.*)$ index.php?q=$1 [L]
REGEXP_REPLACE(content, '(<h2.*?</h2>)', '<div class="heading">\\1</div>')
<h2
и </h2>
.REGEXP_REPLACE(
REGEXP_REPLACE(content, '<h2', '<div class="heading"><h2'),
'</h2>', '</h2></div>'
)
https://regex101.com/r/4dic7E/1