т такие замечатлеьные штуки
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-l
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{SERVER_PORT} !^443$
RewriteCond %{HTTP_HOST} !^не такой домен [NC]
RewriteCond %{HTTP_HOST} !^и не такой не такой домен [NC]
RewriteCond %{HTTP_HOST} !^и так далее [NC]
RewriteRule .* https://%{SERVER_NAME}%{REQUEST_URI} [R,L]
RewriteCond %{SERVER_PORT} !^443$
RewriteCond %{HTTP_HOST} ^sport\.ru [NC]
RewriteRule .* https://%{SERVER_NAME}%{REQUEST_URI} [R,L]
RewriteCond %{HTTPS} off
RewriteCond %{REQUEST_URI} ^/page1$
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
apt-get install remmina
- если нужен хороший рдп клиент. RewriteCond %{HTTP_HOST} ^www\.yurevets37\.ru$ [NC]
# проверка от цикла, если домен такой.
RewriteCond %{REQUEST_URI} ^photo/(.*)$
# если в урл содержит photo,и запомним все что после него в скобках
RewriteRule ^(.*)$ /www.photo.yurevets37.ru/%1 [R=301,L]
#если все правила выполнены то перенаправить все на нвоый домен, а все что в скобках подставить.
<VirtualHost 127.0.0.1:80>
ServerName test.ru
ServerAlias www.test.ru
ServerAdmin test@bk.ru
DocumentRoot /var/www/test.ru/httpd
ErrorLog logs/test_ru_error_log
LogLevel warn
CustomLog logs/test_ru_assest_log combined
<Directory /var/www/test.ru/httpd>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
DirectoryIndex index.php index.html index.htm
Order allow,deny
allow from all
</Directory>
</VirtualHost>
<VirtualHost 127.0.0.1:80>
ServerName forum.test.ru
ServerAlias www.forum.test.ru
ServerAdmin test@bk.ru
DocumentRoot /var/www/forum.test.ru/httpd
ErrorLog logs/forum_test_ru_error_log
LogLevel warn
CustomLog logs/forum_test_ru_assest_log combined
<Directory /var/www/forum.test.ru/httpd>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
DirectoryIndex index.php index.html index.htm
Order allow,deny
allow from all
</Directory>
</VirtualHost>
<VirtualHost 127.0.0.1:80>
ServerName media.test.ru
ServerAlias www.media.test.ru
ServerAdmin test@bk.ru
DocumentRoot /var/www/media.test.ru/httpd
ErrorLog logs/media_test_ru_error_log
LogLevel warn
CustomLog logs/media_test_ru_assest_log combined
<Directory /var/www/media.test.ru/httpd>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
DirectoryIndex index.php index.html index.htm
Order allow,deny
allow from all
</Directory>
</VirtualHost>