New here? Register and read our Community Rules. Accounts are approved by hand.

move site (forced) httpS

mehargagsmehargags Member
edited December 2014 in Help

Hi all,
need a quick feedback.

I'm moving a client's site from HTTP to secure HTTP_S_
Since I want to force a Redirect is this what I put in .htaccess

RewriteEngine On

#RewriteCond %{SERVER_PORT} 80 
#RewriteRule ^(.*)$ https://www.abc.com/$1 [R=301,L]

RewriteCond %{HTTP_HOST} ^abc.com
RewriteRule (.*) https://www.abc/$1 [R=301,L]

I hope this will not cause an breakages in google's crawling ?
Will the above lines suffice redirecting to https AND redirecting non www URLS to WWW.abc ??

Do I need to make the Sitemap.xml again ?

Comments

  • wychwych Member
    edited December 2014

    I used:

    .#force ssl

    RewriteEngine On

    RewriteCond %{HTTPS} !=on

    RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

    F*ck vanillas formating, its crap!

  • mehargagsmehargags Member
    edited December 2014

    @wych interesting! & what about redirecting all abc.com to www.abc.com
    Will wait for some more suggestions!

  • @mehargags said:
    wych interesting! & what about redirecting all abc.com to www.abc.com
    Will wait for some more suggestions!

    Thats another set of rules ;)

    But yes, I drop www. off my domains; im lazy.

  • wych said: F*ck vanillas formating, its crap!

    Use "~~~" before and after code

  • @ValdikSS said:

    Will try that next time, I was using < code>

  • comXyzcomXyz Member
    edited December 2014

    I usually use

    < pre >
Sign In or Register to comment.