How To Redirect http to https with out WWW

9

How To Redirect http to https with out www

This month 3 user In email ask how to redirect all request to https with out www like null24 xD

its easy! you can add This simple and awesome code to your .htacces like me
open your .htacces and add this code:

RewriteEngine On
RewriteCond %{HTTP_HOST} ^www.null24.net [NC]
RewriteRule ^(.*)$ https://null24.net/$1 [L,R=301]
RewriteCond %{HTTPS} !on
RewriteRule ^(.*)$ https://null24.net/$1 [L,R=301]

htacces null24

So When user type null24.net or www.null24.net
All request redirect to https://null24.net

Loading...

9 COMMENTS

    • i use cloudflare and you can do this with cloudflare with out add any code!
      if not you can buy ssl and use this code

      and if you wanna use this code you must buy ssl or use cloudflare free ssl

      yes make secure for payment and good for ranking

LEAVE A REPLY

Please enter your comment!
Please enter your name here