RewriteCond %{QUERY_STRING} &product_id=514(&|$)
RewriteRule ^(.*)$ https://site/portfeli/portfel-transformer-numanni-pw357-2371? [L,R=301]
server {
listen 80;
listen [::]:80;
server_name api.mysite.ru;
location / {
proxy_pass http://mysite.ru/api/;
}
}
server {
listen 80;
listen [::]:80;
root /var/www/mysite/public;
index index.php index.html;
server_name api.mysite.ru;
location / {
try_files $uri /index.php?$args;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php7.3-fpm.sock;
fastcgi_param REQUEST_URI /api$request_uri;
}
}
String path="/home/book_store/magazine";
String pattern="/home/book(|/.*)";
if(path.matches(pattern)){
System.out.println("find");
}
RewriteCond %{QUERY_STRING} ^$
RewriteRule ^$ https://example.com/page/ [R=301,L]
RewriteCond %{THE_REQUEST} " /wp/ "
RewriteRule ^ https://example.com/page/ [R=301,L]
RewriteCond %{THE_REQUEST} " /portfolio\.php\?id=(\d+)"
RewriteRule ^ /%1? [R=301,L]
RewriteRule ^([0-9]+)$ /portfolio.php?id=$1 [L,QSA]
RewriteCond %{ENV:REDIRECT_STATUS} ^$
RewriteCond &%{QUERY_STRING} &id=(\d+)
RewriteRule ^portfolio\.php$ /%1? [R=301,L]
RewriteRule ^([0-9]+)$ /portfolio.php?id=$1 [L,QSA]
$dom = new DOMDocument();
$dom->loadHTML($html);
$xpath = new DOMXPath($dom);
$nodes = $xpath->query('//img[contains(@class, "popup-img")]');
foreach($nodes as $node) {
$a = $dom->createElement('a');
$a->setAttribute('class', $node->getAttribute("class"));
$a->setAttribute('title', $node->getAttribute("alt"));
$href = parse_url($node->getAttribute("src"), PHP_URL_PATH);
$a->setAttribute('href', '..' . str_replace('/thumbs/100/', '/', $href));
$a->setAttribute('style', "background: url('..$href'); -webkit-background-size:cover; background-size:cover;");
$node->parentNode->insertBefore($a, $node);
$node->parentNode->removeChild($node);
}
echo $dom->saveHTML();
$.ajax({ url: "reg_server.php",
"reg_server.php"
на "reg_server"
RewriteCond %{THE_REQUEST} " (/[^?/]+)\.php"
RewriteCond %{THE_REQUEST} "^GET (/[^?/]+)\.php"
RewriteCond %{SERVER_PORT} !^443$ [OR]
RewriteCond %{HTTP_HOST} ^www\. [NC]
RewriteRule ^(.*)$ https://site.ru/$1 [R=301,L]
RewriteCond %{SERVER_PORT} !^443$ [OR]
RewriteCond %{HTTP_HOST} ^www\. [NC]
RewriteCond %{HTTP_HOST} ^(?>www\.|)(.+) [NC]
RewriteRule ^(.*)$ https://%1/$1 [R=301,L]
RewriteCond %{SERVER_PORT}%{HTTP_HOST} !^443(?!www\.) [NC]
RewriteCond %{HTTP_HOST} ^(?>www\.|)(.+) [NC]
RewriteRule ^(.*)$ https://%1/$1 [R=301,L]
RewriteCond %{SERVER_PORT}%{HTTP_HOST} ^(?|443www\.(.+)|80(?>www\.|)(.+)) [NC]
RewriteRule ^(.*)$ https://%1/$1 [R=301,L]