Hello!
I've been tormented all day, I just can't understand what's wrong. A site on a self-written framework, with a single entry point and its router. Please see what is wrong here, I do not know what to think anymore. The strangest thing is that in combat with CentOS and on the local with Windows everything works as it should, but when you deploy on a test with CentOS, the problem begins.
On the same test server, other sites work fine.
The server returns 404.
RewriteEngine On # redirect to www. RewriteCond %{HTTP_HOST} ^(www\.)?oldsite\.ru$ [NC] RewriteRule (.*) http://www.mysite.ru/$1 [L,R=301,NE] RewriteCond %{HTTP_HOST} ^mysite\.ru$ [NC] RewriteRule ^/?(.*) http://www.mysite.ru/$1 [L,R=301,NE] RewriteRule ^cms/$ cms/index.php [L] RewriteRule media/component/([a-zA-Z0-9_\-]+)/(.*) site/components/$1/media/$2 [L] RewriteRule media/plugin/([a-zA-Z0-9_\-]+)/(.*) site/plugins/$1/media/$2 RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ index.php?%{QUERY_STRING} [L] It turned out that .htaccess does not work at all. Maybe something is wrong in the virtual host config?
<VirtualHost *:80> ServerName mysite.testhost.ru ServerAlias www.mysite.testhost.ru DocumentRoot /home/stage/hosts/mysite/www Include fastcgi56.conf <Directory /home/stage/hosts/mysite/www> Options Indexes FollowSymLinks MultiViews AllowOverride All Order allow,deny Allow from all Options All -Indexes </Directory> ErrorLog /home/stage/hosts/mysite/log/error.log CustomLog /home/stage/hosts/mysite/log/access.log combined </VirtualHost>