Currently Viewing Posts Tagged redirect

Fix some Crawl errors of my blog

I found some errors in Google Search Console —¬† Crawl Error. More than 400 errors of Not-Found.

After checking the details of these errors, I am noticed that they are the dead links which were brought after I converted this blog from MovableType to WordPress.

Some links are changed and I forgot to implement the redirection.

OK. Now I add some rules in .htaccess file to make these dead link to redirect to the correct URLs.


Here is some examples.

Monthly archives:

Old url is

New url is

So I added following rule into .htaccess file in root.

# Redirect monthly archives
RewriteRule ^archives/([0-9\/]*)/ /$1/ [R=301,L]

Tag page:

Old tag page is,1&tag=beta&limit=20

New tag page is

I add following rule into .htaccess

RewriteCond %{QUERY_STRING} ^IncludeBlogs=([0-9,]*)&tag=(.*)&limit=20$
RewriteRule ^(.*)$ [L,R=301]

Another type of tag page:

Old tag page is

New tag page is

Add following into .htaccess file.

RewriteCond %{QUERY_STRING} ^tag=(.*)&blog_id=([0-9])$
RewriteRule ^(.*)$ [L,R=301]

Nginx Redirect HTTP to HTTPS and non-WWW to WWW

Here is my solution to do the redirection.

Say, I have a web site. I host it with SSL.

I want all these three type of host go to the same Unique Internet Address.





There are some requirement:

  • Nginx v1.8
  • SSL Certificate is issued for both¬† and

Continue reading “Nginx Redirect HTTP to HTTPS and non-WWW to WWW”

  • Archives