*

Miller

  • ***
  • 141 posts
htaccess redirect
« on: September 18, 2018, 08:29:35 PM »
Hi mbthemes ,
My website chain redirecting

Domain.com — http://domain.comhttps://domain.com —https://www.domain.com

RewriteEngine On
# ensure www.
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$
RewriteCond %{REQUEST_URI} !^/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
RewriteRule ^ https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

# ensure https
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteCond %{HTTPS} off
RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$
RewriteCond %{REQUEST_URI} !^/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

I want.

Domain.com — https://www.domain.com

*

MB Themes

Re: htaccess redirect
« Reply #1 on: September 19, 2018, 08:57:45 AM »
@Miller
I am not skilled with these htaccess things. Check google.
Anyway I do not think https part is correct.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots