.htaccess caused 404 erroe except index

how problem occurred

site used to run perfectly until I made some changes to force http traffic to https and for that reason i had to make change in the .htacces file.
unaware of the root directory, I first changed the one that come default with infinityfree

some error massage popped up while saving so I deleted the .htaccess in root directory hoping to recreate it freshly afterwards.


Before doing anything with my .htacces file the site home page used to load like https://anisuki.rf.gd/home

after the issue every other pages showing 404 error and every the url needs to show extension otherwise its not loading up (e.g. https://anisuki.rf.gd/home.php)

what im looking help for:

  1. fix the .htaccess in root dir (and how i can recreate it without messing it up)
  2. other pages except index to load
  3. remove the url extension (e.g. /home.php to /home )

Other Information

since im using custom made player its a hassle to change it all up just to specify the link extension.

here’s the code i used in htdocs/.htaccess to force traffic to https

RewriteEngine On
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteCond %{HTTPS} off
RewriteCond %{HTTP:CF-Visitor} !{“scheme”:“https”}
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

I’m not seeing any 404 errors


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.