-1

I would like to forward all requests to a domain via .htaccess.

Everything to: https://domain.tdl

  • No-www
  • https

I have tried many spelling, but it has not worked for completely.

hjpotter92
  • 78,589
  • 36
  • 144
  • 183
baumpaul
  • 1
  • 1

1 Answers1

2

I think the following single set of rule-set should work:

RewriteEngine On

RewriteCond %{HTTPS} off [NC,OR]
RewriteCond %{HTTP_HOST} ^www\. [NC]
RewriteRule ^ https://domain.tld%{REQUEST_URI} [R=301,L]
hjpotter92
  • 78,589
  • 36
  • 144
  • 183