This is the code in my.htaccess file
#force non-www
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www\.(([a-z0-9_]+\.)?example\.com)$ [NC]
RewriteRule .? http://%1%{REQUEST_URI} [R=301,L]
This code redirects www.example.com to example.com
But whenever there is something ahead of the url
Example -
www.example.com/file-consumer-something
It redirects me to example.com
I want it to become example.com/file-consumer-something
Can someone help ?