.htaccess隐藏URL 301重定向的字符串(包括特殊字符?)

My sites are have just been redirected to HTTPS from HTTP using htaccess. Since the sites show index.php? in the URL structure. I am unsure why its doing this.

Originally it was showing the following: https://www.example.com.au/index.php?/rest-of-URL

Using the following code in htaccess I was able to limit it down to: https://www.example.com.au/?/rest-of-URL

RewriteBase /
RewriteCond %{THE_REQUEST} ^GET.*index\.php\?/ [NC]
RewriteRule (.*?)index\.php? / [R=301,NE,L]

I need to remove the ?/ from the URL using htaccess

Please someone help :(

I resolved the issue by changing internal links for all pages instead. Thank you for everyone's help. If you have a solution that actually fixes it via the htaccess file I would be extremely interested. Thanks