Highlighted

Redirect http:// to https://and remove .html extensions [Branched]

New Here ,
Nov 30, 2019

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

1_NgUzE1LSf0SywbJiCLasZg.jpeg

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.

Adobe Community Professional
Correct answer by Nancy OShea | Adobe Community Professional

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.

 

 

 

 

TOPICS
How to

Views

576

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Redirect http:// to https://and remove .html extensions [Branched]

New Here ,
Nov 30, 2019

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

1_NgUzE1LSf0SywbJiCLasZg.jpeg

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.

Adobe Community Professional
Correct answer by Nancy OShea | Adobe Community Professional

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.

 

 

 

 

TOPICS
How to

Views

577

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Nov 30, 2019 0
Adobe Community Professional ,
Nov 30, 2019

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.

 

 

 

 

Nancy O'Shea, ACP
Alt-Web.com

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Nov 30, 2019 0
New Here ,
Dec 01, 2019

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.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Dec 01, 2019 0