Lathoz

www-to-non-www

Jan 24th, 2025
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. RewriteEngine On
  2. RewriteCond %{HTTPS} off
  3. RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
  4.  
  5. RewriteEngine On
  6. RewriteBase /
  7. RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
  8. RewriteRule ^(.*)$ https://%1/$1 [R=301,L]
  9.  
  10. RewriteEngine On
  11. RewriteCond %{REQUEST_FILENAME} !-d
  12. RewriteCond %{REQUEST_FILENAME} !-f
  13. RewriteRule ^(.*)$ https://%{HTTP_HOST} [L,R=301]
  14.  
Advertisement
Add Comment
Please, Sign In to add comment