DirectorySlash Off
ErrorDocument 404 /404.html
RewriteEngine on
RewriteBase /
RewriteCond %{THE_REQUEST} "^\S+ /([^?.]+)\.html"
RewriteRule ^(?:index|([^.]+))\.html$ https://zaoks.ru/$1 [R=301,L]
RewriteCond %{HTTPS} !on [OR]
RewriteCond %{HTTP_HOST} ^www\. [NC]
RewriteRule ^(.*)$ https://zaoks.ru/$1 [R=301,L]
RewriteCond %{DOCUMENT_ROOT}/$1.html -f
RewriteRule ^([^.]+)$ /$1.html [L]
<Files ~ "\.pdf$">
Header set X-Robots-Tag "noindex, nofollow"
</Files>
RedirectMatch 301 ^/(.*?)/remont/remont(/.*) http://site.ru/$1$2
RewriteRule ^(.*?)/remont/remont(/.*) http://site.ru/$1$2 [R=301,L]
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]