How to make the correct htaccess?

Hi! Question - how to make the right rule using htaccess, so that when opening links
site.ru/postname.json


Opened address
site.ru/postname?json
(without a redirect)

Tried:

RewriteRule (.*)\.json$ $1?json [L,QSA]
June 10th 19 at 14:55
1 answer
June 10th 19 at 14:57
RewriteRule (.*)\.json$ $1\?json [R=301,L]
Not working right.
Is the redirect, and you need to it nebylo - nikita.Stracke commented on June 10th 19 at 15:00
I mean that the 200 OK ? - Lavern_Schuppe commented on June 10th 19 at 15:03

Find more questions by tags htaccessWordPress