I found on the Internet here such waters:

php_value default_charset utf-8 RewriteEngine on Options +FollowSymlinks RewriteCond %{REQUEST_FILENAME} !-d #RewriteCond %{REQUEST_FILENAME} !-f RewriteCond $1 !^(index\.php|static|vendor|images|assets|img|my|sys|robots\.txt) RewriteRule ^.*$ index.php [L,QSA] 

it works in all cases, but when I enter a request of the form in the address period of the browser: http://mydomain.com/country/oteli-indiji , it displays a 404 error. By typing, I realized that it gives an error precisely because of the word country , I can not understand why.

Purpose: absolutely all input requests $_SERVER["REQUEST_URI"] should be passed to index.php for further processing.

  • you have a country folder there. maybe from this. I think I need to remove RewriteCond% {REQUEST_FILENAME}! -d - Saidolim
  • there is no such folder, there are files of the type: country country_bolgarija.php country_egipet_kair.php country_egipet_sharm-el-sheih.php - valextt
  • country file matches RewriteCond %{REQUEST_FILENAME} !-f - Saidolim
  • if you remove RewriteCond% {REQUEST_FILENAME}! -f, then the styles in the index.php outputted through valextt , are no longer loaded
  • one
    yes, it turned out RewriteCond $ 1! ^ (index \ .php | static | vendor | images | assets | my | sys | robots \ .txt) - valextt

1 answer 1

after discussions in the comments

there was a country file in the folder and links from this did not work http://mydomain.com/country/oteli-indiji

Suggested to rename the file country to another

  • one
    The issue is resolved! Thanks to Saidolim for the help! - valextt