Redirect 301 /https://old.com/noob /https://new.com/good
Redirect 301 /noob https://new.com/good
RedirectMatch 301 ^/noob$ https://new.com/good
RewriteCond %{HTTP_HOST} ^old\.com$
RewriteRule ^noob$ https://new.com/good [R=301,L]
<base href="http://site.ru/">
htmlbook.ru/html/baseDirectorySlash Off
в htaccess. REQUEST_FILENAME
The full local filesystem path to the file or script matching the request, if this has already been determined by the server at the time REQUEST_FILENAME is referenced. Otherwise, such as when used in virtual host context, the same value as REQUEST_URI. Depending on the value of AcceptPathInfo, the server may have only used some leading components of the REQUEST_URI to map the request to a file.
REQUEST_URI
The path component of the requested URI, such as "/index.html". This notably excludes the query string which is available as its own variable named QUERY_STRING.
%{REQUEST_FILENAME} -> /var/www/news/list
%{REQUEST_URI} -> /news/list
RewriteEngine On
RewriteRule ^page/(?!index\.php)(.+) /page/index.php?$1 [L]
Options +FollowSymLinks
RewriteEngine On
RewriteBase /
RewriteRule (.*)\.html$ https://domain.ru/$1/ [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !sitemap\.xml$
RewriteRule ^(.*[^/])$ https://domain.ru/$1/ [L,R=301]
RewriteCond %{HTTP:PORT} !^443$ [OR]
RewriteCond %{HTTP_HOST} !^domain\.ru [NC]
RewriteRule (.*) https://domain.ru/$1 [R=301,L]
# The Friendly URLs part
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
RewriteRule ^(.*)$ /public/$1
RewriteRule ^(.*)$ public/$1
RewriteCond %{REQUEST_FILENAME} !-f # не файл RewriteCond %{REQUEST_FILENAME} !-d # не папка
# не файл
RewriteCond %{REQUEST_FILENAME} !-f
# не папка
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^/user/plugins/fred/elFinder-2\.1\.50
RewriteCond %{THE_REQUEST} " /current/public/(\S*)"
RewriteRule ^ https://%{HTTP_HOST}/%1 [R=301,L,NE]
RewriteCond %{HTTP_HOST} ^(www\.|)oldsite\.ru$ [NC]
RewriteRule ^(category1|category2)/.* http://newsite.ru/$0 [R=301,L]
RewriteCond %{HTTP_HOST} ^(www\.|)oldsite\.ru$ [NC]
RewriteRule ^ http://newsite.ru/ [R=301,L]
RewriteRule ^news/(sport)$ /pages/news.php
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.(.*) [NC]
RewriteRule ^(.*)$ https://%1/$1 [R=301,L]
RewriteRule ^news/(sport)$ /pages/news.php?type=sport [L]
RewriteRule ^uslugi/new_usluga/$ /folder/index.php [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !=/favicon.ico
RewriteRule ^ index.php [L]
[OR]
можно обойти проверку существования папки RewriteCond %{REQUEST_FILENAME} !-d
.RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} ^/uslugi/ [OR]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !=/favicon.ico
RewriteRule ^ index.php [L]
DirectoryIndex
сделает свое дело и при запросе существующей папки /uslugi/new_usluga/ будет вызван /uslugi/new_usluga/index.php. Остальные запросы, как и прежде, обработает index.php в корне сайта.