I have a website learn2hack.io and when i submit to google search console i keep getting errors, first it was duplicate without canonical now its page with redirect error.
i have included
<link rel="canonical" href="https://learn2hack.io" />
on my index.php file and i created rules in .htaccess
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.learn2hack\.io [NC]
RewriteRule ^(.*)$ https://learn2hack.io/$1 [L,R=301]
RewriteCond %{THE_REQUEST} /index\.php [NC]
RewriteRule ^(.*)index\.php$ /$1 [L,R=301]
I did the redirect in htaccess because chat gpt told me it would fix indexing problems.
how can I get my index page properly indexed? all my other pages seem to be fine except my index.php page file.