Copy link to clipboard
Copied
Hi,
When I edit .htaccess file and put these codes into .htaccess file(To remove .html) its worked but only for index page.
Question 1).
How can I remove .html for all pages?
RewriteEngine on
RewriteCond %{REQUEST_URI} ^(.*/)index\.html$ [NC]
RewriteRule . %1 [R=301,NE,L]
# Begin Muse Generated redirects
# End Muse Generated redirects
When I added additional codes for Http to https got warning please see the attached
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
RewriteCond %{REQUEST_URI} ^(.*/)index\.html$ [NC]
RewriteRule . %1 [R=301,NE,L]
# Begin Muse Generated redirects
# End Muse Generated redirects
Question 2).
How can I fix both problems?
Thanks.
Copy link to clipboard
Copied
I have branched this to a new topic because your question is more complicated than the original thread from 2 years ago.
Obviously this question has noting to do with Muse. .htaccess is a server file. Does your hosting plan include C-Panel? If so, that's the easiest way to edit your .htaccess file. See links below.
Removing file extensions.
https://www.plothost.com/kb/how-to-remove-php-html-extensions-with-htaccess/
Rewrite HTTP to HTTPS
https://www.name.com/support/articles/115005296088-Redirect-HTTP-to-HTTPS-automatically
NOTE: do NOT duplicate RewriteEngine On. When it's on, it's on.
Copy link to clipboard
Copied
Nancy Oshea,
Thanks for your quick response. Yes, I have access to cPanel and I replace those codes instead of my previous codes but not working. So I decided to keep my previous codes because something is better than nothing. My previous codes working for the index page.
Thanks, Kashem.