Help with .htacces file

I have a problem with my website that every time I try to access it from a link outside the website it give me a message that this website redirects you too many times. know I played with my htacces file to know where exactly the problem is and I found it but I don’t know how to fix it
this is the code that causing the problem.

RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^(.*)$ $1.php [NC,L]
RewriteRule ^$ /browser-games/ [L]

the last part amusing to display the content of /browser-games/index.php in https://gamehup.tk/
I think this what causes this code problem does there any code else i can use to do the same thing but without redirecting too much and thanks this is the entire code in the .htaccess file

php_flag output_buffering on

IndexIgnore *
# make 404 cusom error page
ErrorDocument 404 /404error.html
# make 503 cusom error page
ErrorDocument 503 /503error.html
# make 500 cusom error page
ErrorDocument 500 /500error.html
RewriteEngine On
# turn the sitemap from .php to .xml
RewriteRule ^sitemap\.xml/?$ sitemap.php
#force none www version of website
RewriteCond %{HTTP_HOST} ^www\.ovongames\.tk [NC]
RewriteRule ^(.*)$ https://ovongames.tk/$1 [L,R=301]
RewriteCond %{REQUEST_FILENAME} !-d

RewriteCond %{REQUEST_FILENAME}\.php -f

RewriteRule ^(.*)$ $1.php [NC,L]

RewriteRule ^$ /browser-games/ [L]
# HTID:6136692: DO NOT REMOVE OR MODIFY THIS LINE AND THE LINES BELOW

RewriteCond %{HTTP_REFERER} !^$

RewriteCond %{HTTP_REFERER} !^http(s)?://(www.)?(www.ovongames.tk|ovongames.tk|gamehup.000webhostapp.com)(/)?.*$      [NC]

RewriteRule .*.(.*)$ https://ovongames.tk/ [R,NC]
#set the website languge 
DefaultLanguage en-us
# set the website meta tag
AddDefaultCharset UTF-8
# tell the browser to only use https connection
Header add Strict-Transport-Security "max-age=31415926;includeSubDomains;"
# do not allow content of the website to be requested from other domain
Header add Access-Control-Allow-Origin: "*"
Header add Access-Control-Allow-Methods: "GET,POST,OPTIONS,DELETE,PUT"
Header add Access-Control-Allow-Headers: "Content-Type"

# X-XSS-Protection
<IfModule mod_headers.c>
	Header set X-XSS-Protection "1; mode=block"
	Header always append X-Frame-Options SAMEORIGIN
	Header set X-Content-Type-Options nosniff
</IfModule>
# HTID:8363026: DO NOT REMOVE OR MODIFY THIS LINE AND THE LINES BELOW
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http(s)?://(www.)?(www.ovongames.tk|ovongames.tk|ovongames.000webhostapp.com)(/)?.*$      [NC]
RewriteRule .*.(.*)$ https://ovongames.tk [R,NC]
# DO NOT REMOVE OR MODIFY THIS LINE AND THE LINES ABOVE HTID:8363026:

and thanks for help. i think i post too many problem Sorry guys i hope you tolerateme a little bit :slight_smile:

and I only want to redirect the url/index.php to url/browser-games/

looks like the really problem was in this code

#RewriteCond %{HTTP_REFERER} !^$
#RewriteCond %{HTTP_REFERER} !^http(s)?://(www.)?(www.ovongames.tk|ovongames.tk|gamehup.000webhostapp.com)(/)?.*$   [NC]
#RewriteRule .*.(.*)$ https://ovongames.tk/ [R,NC]

this code is what made me crazy for the last 24 hours tryin to figure out what’s is wrong with my website once i removed it the website works fine.

now the only problem left is
that my subdomain https://ovongames.000webhostapp.com/ doesn’t lead to my custom domain