1. home page
  2. Meow~

December 17, 2015 | Try SSL for the first time, flirt with htaccess

 77094b36acaf2eddbb0f22098c1001e938019357

My cat recently recruited a group of space free users..

Then today I met a person who wants to bind SSL (small green lock)

Then gradually start to try.... (Anyway, Ben Miao wants to get it...)

——————Try several times during the record will not be one by one.. Anyway, it's all in the past...

Domain name: blog.siryin.com

Implantation certificate: Votone free SSL

First of all, the blog was successfully moved over and can be accessed normally under http

Then enter the SSL/TLS manager of CPanel

Click Manage SSL Site

Select the domain name to add SSL

————————————

There are multiple configuration files in the Votone free SSL package. This space uses Apache

Then open the compressed package with 3 files. (It's too lazy to take a screenshot after deleting the file)

File 1: Certificate Chain

Document 2: Public Network Certificate

File 3: Private Key

Then we use notebooks (Notepad++is more professional...)

Copy the public network certificate CRT of file 2 to the first box certificate in the CP panel

Then copy the private key KEY of file 3 to the second box KEY in the CP panel

Finally, copy the certificate chain of file 1 to the last item on the CP panel (if the certificate chain is not entered, it may not be accessible on the phone)

If there is no input error and the SSL certificate is valid. 3 items will display the tick marks

Finally, click Install Certificate...

Access using https is normal.


 

OK, you can use https now. Then you need to jump from http to https.

Modify htaccess to achieve 301 jump

Because it is the whole site http jump to https, you can set it as follows: all 80 ports access the jump connection.... so……

 RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$  https://blog.siryin.com/ $1 [R=301,L] OK. That's it.. It must be written at the front, otherwise it seems useless... —————————————————————————————————————— Then I flirted with the htaccess file of this blog.. Although I have made a circle, I still don't understand.. But it doesn't matter if it works, does it- Visit any prefix, such as ABC.guoguomiao.com 111.guoguomiao.com, followed by the directory ABC.guoguomiao.com/ml/music Will automatically jump to www.guoguomiao.com.. RewriteEngine On RewriteCond %{HTTP_HOST} !^ www.guoguomiao.com$ [NC] RewriteRule ^(.*)$  http://blog.moe.xin/ $1 [L,R=301]

 

score zero , full marks 5-star
zero ticket
fabulous one
After reading and collecting, you can find it next time
  • Copyright notice: This article is published based on the Knowledge Sharing Attribution - Sharing in the Same Way 3.0 Mainland China License Agreement. Please follow this agreement for reprinting
  • Article link: https://moe.xin/399.html [ copy ](Please indicate the source and link of this article when reprinting)
  • No relevant articles in this article
Previous:
: Next

12 comments

 gravatar

  1. The service provided by Wotong is quite up to standard, although it is free of charge.
    Having bought the AlphaSSL Wildcard certificate from the VMBOX channel, his family will only give you the final certificate;
    You also need to go to the official website to download the root certificate and intermediate certificate, and then merge and deploy the certificate chain manually.

    #1st floor
    1. @ tcdw So troublesome... Blind X_X

  2. Why have you been struggling with SSL recently

    #2nd floor
    1. @ stan I didn't bother.. A "customer" wants.... Although I am too lazy to apply for free SSL...

  3. The server has started to struggle

    #3rd floor
    1. @ Small F Stay...... In fact, I'm too lazy to bother.....

  4. There is something wrong with the website title display And the expression of the comment can't be shown. I don't know whether it's my card or something

    #4th floor
    1. @ ZeroYearn Meow.. No problem..... The expression is broken... It's not fixed...

  5. If conditions permit, HSTS can also be enabled

    #5F
    1. @ Jiajia mushroom Not very good at it.. Anyway, it's not my website.. No matter..

  6. Fruit cat

    #6th floor
  7. Sign in successfully! Sign in time: 12:23:37 am Clock in every day to make life more exciting~

    Meow~

    #7th floor