There is a Yii2 project. And I needed to make temporary redirect from domain sitename .ru to subdomain ru. sitename.com for all pages, except some ones (which begins with /news). I've made the following:
RewriteEngine On
AddDefaultCharset UTF-8
php_value upload_max_filesize 20M
php_value post_max_size 25M
php_value memory_limit 256M
RewriteCond %{REQUEST_URI} !^/news.*$
RewriteRule (.*) http://ru.sitename.com/$1 [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php [L]
As a result all redirects works properly. But when I try to open pages which begins with /news, then the index.php file downloading process starts. How can I fix this one? Thanks in advance!
