I transfer the site and ran into a problem: the CNC stopped working, and since the site is tied to them, then its functionality is badly damaged - the main page opens all the time, regardless of the selected menu item. Everything worked on the old hosting, locally on OpenServer it still works, but when transferred to VDS ... alas. Apache 2.4.6, PCP 5.4, On other sites on this server there are no problems with mod_rewrite, but there the CNC are more adequately implemented, and here ... Like this:
Options +FollowSymLinks RewriteEngine on RewriteCond %{HTTP_HOST} ^site\.ru$ [NC] RewriteRule ^(.*)$ http://site.ru/$1 [R=301,L] RewriteBase / php_flag register_globals on ErrorDocument 404 /404.html php_flag display_errors On php_flag display_startup_errors On #AddDefaultCharset windows-1251 RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^priem/([0-9]+)/?$ index.php?menu=priem&month=$1 [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^catalog/$ index.php?catalog=ok [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^catalog/([a-zA-Z_0-9]+)/$ index.php?cat=$1&catalog=ok [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^catalog/([a-zA-Z_0-9]+)$ index.php?cat=$1&catalog=ok [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^catalog/([a-zA-Z_0-9]+)/([a-zA-Z_0-9]+).html index.php?cat=$1&catalog=ok&tov=$2 [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^catalog/([a-zA-Z_0-9]+)/([a-zA-Z_0-9]+)/([a-zA-Z_0-9]+).html index.php?cat=$1&pages=$2&tov=$3&catalog=ok [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^catalog/([a-zA-Z_0-9]+)/([a-zA-Z_0-9]+)/?$ index.php?cat=$1&pages=$2&catalog=ok [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^([a-zA-Z_0-9]+)/([a-zA-Z_0-9]+)/([a-zA-Z_0-9]+).php index.php?menu=$1&pages=$2&doc=$3 [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^([a-zA-Z_0-9]+)/([a-zA-Z_0-9]+)/([a-zA-Z_0-9]+).html index.php?menu=$1&pages=$2&doc=$3 [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^([a-zA-Z_0-9]+)/([a-zA-Z_0-9]+)/?$ index.php?menu=$1&pages=$2 [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^([a-zA-Z_0-9]+)/([a-zA-Z_0-9]+).html index.php?menu=$1&doc=$2 [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^([a-zA-Z_0-9]+)/?$ index.php?menu=$1 [L] Server support for two days could only give birth:
In .htaccess there are many duplicate rules, due to which such errors occur. In this case, it is recommended to contact the site developer directly.
A few hours of dancing with a tambourine and commenting line by line - did not give anything. Mod_rewrite itself is enabled and phpinfo () sees it. I understand that the dog is buried somewhere here, but I cannot find it. Please tell in which direction to dig. Thank!
php_flag register_globals oncan delete it, in php 5.4 it is not. - Vismanvar_dump($_GET);and check if mod_rewrite works by adding the required get variables with values. - Visman