How to write a Mod Rewrite rule?

Url
site.xx/GjddfrF
Need to everything after the / is redirected without a redirect on
site.xx/index.php?hash=GjddfrF
When you open the site.xx to start site.xx/index.php and no redirections not prosihodit
There's also a bunch of other links that also do not have to be routed, for example:

http://site.xx/book/
http://site.xx/url/


Trying so leads to a glitch
RewriteRule ^(.*)/?$ index.php?hash=$1 [L,QSA]
September 26th 19 at 06:08
1 answer
September 26th 19 at 06:10
RewriteCond %{REQUEST_FILENAME} !-f # not a file
RewriteCond %{REQUEST_FILENAME} !-d # not a directory
RewriteCond %{REQUEST_FILENAME} !-s # not SIM.link
RewriteCond %{REQUEST_FILENAME} !-l # not the link
RewriteRule ^(.+)$ /index.php?hash=%{QUERY_STRING} [L]

Find more questions by tags ApachePHP