I have a .htaccess file with those contents:
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ([^/\.]+)$ index.php?string=$1&match=all [L]
So when I type: domain.com/test the page redirects to domain.com/index.php?string=test&match=all
But if I want to reach this page: domain.com/test#sub1
the page redirects to domain.com/index.php?string=test&match=all
instead of domain.com/index.php?string=test#sub1&match=all
How do I proceed?
domain.com/testnotdomain.com/test#sub1#is only used by the browser, and not sent with the HTTP request. The server never sees it.