There is one index.php, and url like http://domains.ru/city/stock . It is necessary that when entering the site through a similar url (after the domain name there can be only 1 or 2 parameters, the names of the parameters are any) the user gets at index.php, which is in the root of the site. It was done like this:
RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^css/(.*).css$ css/$1.css [L,QSA] RewriteRule ^(.*)$ index.php?$1 [L,QSA] We enter http://domains.ru/city/stock and get index.php without styles and in the console I see an error:
Resource interpreted as Stylesheet but transferred with MIME type text/html: "http://domains.ru/city/css/style.css". Tell me how to fix it?
RewriteRule ^css/(.*).css$ css/$1.css [L,QSA]line? She redirects to the same address that was called. Yes, and not existing files (previousRewriteCondjust refer to this redirection, and not to the secondRewriteRule). - Visman pmhttpsprotocol at the site in question. Do your stylesheet also download thehttpsprotocol? - Vismanhttp://domains.ru/city/css/style.css, and herehttp://domains.ru/css/style.css? If yes, then write in the templates is not a relative path to the styles, but absolute. - Visman