Invalid command 'AddHandler\xe2\x80\x8b'
RewriteCond %{REQUEST_URI} ^(.*/)\d+-([^/]+\.html)$
RewriteRule ^ %1%2 [R=301,L]
RewriteRule ^(|.*/)\d+-([^/]+\.html)$ /$1$2 [R=301,L]
RewriteRule ^(et|ru)/catalog/kuldehted/sormused/pulma-sormused/?$ /$1/catalog/kuldehted/sormused/abielusormused [R=301,L]
RewriteRule ^(et|ru)/(catalog/kuldehted/sormused)/pulma-sormused/?$ /$1/$2/abielusormused [R=301,L]
В оригинале такие ссылки
https://site.ru/news/50/ostorozhno
нужны такие
https://site.ru/50-ostorozhno
желательно на конце со слешем или без, сейчас оба варианта работают.
RewriteRule ^(\d+)-([^/]+)$ news.php?id=$1&slug=$2
/
RewriteRule ^(\d+)-([^/]+)/$ news.php?id=$1&slug=$2
ErrorDocument 404 /notfound.php
RedirectMatch 301 ^/obshhaya-informatsiya/zemlya$ http://site.ru/obshhaya-informatsiya/zemlya/city
RedirectMatch 301 ^/(obshhaya-informatsiya/zemlya)$ http://site.ru/$1/city
RewriteRule ^(.*)$ ./index.php?page=$1
RewriteRule ^([^/.]+)/(\d+)$ index.php?page=$1&i=$2
RewriteRule ^([^/.]+)/?$ index.php?page=$1
RewriteCond page=$1&i=$2 ^(.+=[^&]+)
RewriteRule ^([^/.]+)(?:/(\d*))?$ index.php?%1
<Files "protected_file.php">
AuthName "Member Only"
AuthType Basic
AuthUserFile /etc/apache2/.htpasswd
require user Vasily
Satisfy All
</Files>
Satisfy Any
AuthName "Member Only"
AuthType Basic
AuthUserFile /etc/apache2/.htpasswd
require valid-user
Satisfy All
Header set Content-Disposition attachment "expr=%{QUERY_STRING} == 'download=1'"
Header set Content-Disposition attachment env=attach
RewriteCond %{QUERY_STRING} =download=1
RewriteRule ^ - [E=attach:1]
ServerName domain.ru
ServerAlias *.domain.ru
ServerSignature Off
RewriteEngine on
RewriteCond %{HTTP_HOST} ^domain\.ru [NC]
RewriteRule ^/(.*) http://www.domain.ru/$1 [L,R=301]
RewriteCond %{HTTP_HOST} ^(www\.)?+.+\.domain\.ru$ [NC]
RewriteRule ^/(.*)\.html$ /index.php?page=$1 [L]
<link rel="icon" href="/someimage.ico" />
RewriteCond %{REQUEST_URI} !/test\.php
RewriteRule .* test.php
/favicon.ico
будет вызван test.php.$log = date('H:i:s ') . $_SERVER['REQUEST_URI'] . PHP_EOL;
file_put_contents('log.txt', $log, FILE_APPEND);
RewriteEngine On
RewriteCond %{THE_REQUEST} " /start\.php\?id=(123456) "
RewriteRule ^ https://my-bot.ru/start/id/%1? [R=301,L]
RewriteRule ^start/id/(123456)$ /start.php?id=$1 [L]