I have a site of type LP, when clicking on the links in the menu, the scrolling scrolls to the corresponding block. And URLs in look like this: http: // site / city / interiors . Did url-s with: history.pushState. Those. All clicks in the menu are saved in the browser history.
I need to make it so that when I switch from the browser’s history, the index page of the site index.php is launched.
I tried to do this:
RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php?$1 [L,QSA] But in this case, like index.php works, but css styles, images, videos are not loaded - in general, the site does not work.
Then he tried this:
AddType "text/html; charset=utf-8" .htm .html AddDefaultCharset utf-8 PHP_VALUE default_charset utf-8 RewriteEngine on RewriteCond %{HTTP:Accept-Language} (en|ru) [NC] RewriteBase / RewriteRule ^/([a-zA-z_-]+)/([a-zA-z_-]+)$ index.php?city=$1&block=$2 But it does not work, the launch of index.php does not happen: Error 404 Tell me how to fix this?
Another important point: if the url: http: // site / admin , then redirected to index.php, which should not occur at the root of the site.