WordPress.org

Support

Support » Plugins and Hacks » [Resolved] Redirects from Blogger giving a 403 error

[Resolved] Redirects from Blogger giving a 403 error

  • Revery123
    Member

    @revery123

    After installing bulletproof and securing the .htaccess files, my redirects from my old blogger (specifically posts, not the homepage) returns 403 errors. However, when I set the .htaccess to default my redirects work again. Currently I am using the “Blogger To WordPress” plug in.

    What should I add to the .htaccess file (in bulletproof mode) to allow my redirects to work from blogger?

    http://wordpress.org/extend/plugins/bulletproof-security/

Viewing 15 replies - 1 through 15 (of 15 total)
  • Plugin Author AITpro
    Participant

    @aitpro

    I would need to see some of the Post URL’s to tell you why they are being forbidden. Please post a couple of them. And also explain how you are currently doing the redirects. Thanks.

    Revery123
    Member

    @revery123

    Plugin Author AITpro
    Participant

    @aitpro

    So how are you doing the redirect? Where is the redirect code? is it php code? is it .htaccess code?

    Revery123
    Member

    @revery123

    I am using the “blogger to wordpress” plugin for my redirects:
    http://wordpress.org/extend/plugins/blogger-to-wordpress/

    It generates code that I replace my blogger template html with.

    Plugin Author AITpro
    Participant

    @aitpro

    Ok i see that you can generate a custom js script and add it to your blogger site and it will redirect to your WordPress site. i looked at that js script and it could cause your site to get devalued or penalized by google for using this type of redirect method. Google and other search engines recommend that you do not use of the meta http-equiv=”Refresh” content=”0 tag.

    Source: http://support.google.com/webmasters/bin/answer.py?hl=en&answer=79812

    This meta tag sends the user to a new URL after a certain amount of time, and is sometimes used as a simple form of redirection. However, it is not supported by all browsers and can be confusing to the user. The W3C recommends that this tag not be used. We recommend using a server-side 301 redirect instead.

    But if you are stuck with doing this method then i guess you will have to take the risk.

    Note: The blogger to wordpress plugin has not been updated in over 3 years. I cannot test that plugin for this reason and also the reason that i do not have a blogger site to test with.

    What i think you may need to do is something like this:

    the js script is doing the redirect to your site, but the plugin on your WordPress site is trying to force the redirection into a very unsafe method of redirection once the URL is redirected from your blogger site. that unsafe method is a very common simulated RFI hacking attempt –
    game-wisdom.com/?b2w=http://chronicgamedesigner.blogspot.com/2012/07/the-game-design-tax-man.html

    What you may be able to do is add 301 .htaccess redirect code to correct this unsafe redirect method.

    see this tutorial on how to do 301 .htaccess redirects >>> http://forum.ait-pro.com/forums/topic/htaccess-redirect-code-where-do-i-add-redirect-htaccess-code/

    Personally i think the whole approach is a very bad one from start to finish and you will probably just end up with a low ranking website or maybe even get penalized by Google for the redirection method you are currently using.

    Plugin Author AITpro
    Participant

    @aitpro

    Or you can of course remove/comment out the BPS security filters in your root .htaccess file that protect your website against RFI hacking attempts. If you would like that information then let me know, but personally i think you should not do this and actually find a better method to redirect your blogger site to WordPress. Thanks.

    Revery123
    Member

    @revery123

    If I use the 301 .htaccess method, do I have to include every single url? He has over 400 posts.

    Plugin Author AITpro
    Participant

    @aitpro

    You could use more sophisticated .htaccess code such as this code.

    RedirectMatch 301  ^/([^/]+)/([^/.]+)\.html$ /$1/$2/
    RedirectMatch 301  ^/([^/]+)/([^/]+)/([^/.]+)\.html$ /$1/$2/$3/
    
    Of if you need to limit it by hosts, you can use mod_rewrite:
    
    RewriteCond %{HTTP_HOST} sitename.com [NC]
    RewriteRule ^([^/]+)/([^/.]+)\.html$ /$1/$2/ [R=301,L]
    
    RewriteCond %{HTTP_HOST} sitename.com [NC]
    RewriteRule ^([^/]+)/([^/]+)/([^/.]+)\.html$ /$1/$2/$3/ [R=301,L]
    Plugin Author AITpro
    Participant

    @aitpro

    One thing i keep meaning to add to my redirect tutorial is that the “+” sign is also a “placeholder” for a back reference.

    The $1 back reference will back reference the first “+” sign, the $2 back reference will back reference the second “+” sign, etc etc etc.

    Plugin Author AITpro
    Participant

    @aitpro

    Plugin Author AITpro
    Participant

    @aitpro

    And i went ahead and added this example of the code above to the Forum Tutorial with an explanation of how it works >>> http://forum.ait-pro.com/forums/topic/htaccess-redirect-code-where-do-i-add-redirect-htaccess-code/#back-reference-plus-sign

    Plugin Author AITpro
    Participant

    @aitpro

    Did the redirect code above work? Can this thread be resolved? Please resolve this thread if the issue has been taken care of. Thanks.

    Revery123
    Member

    @revery123

    I have not tested the code yet, I will get back to you when I do. Hopefully in a few days, thanks for the solutions.

    Plugin Author AITpro
    Participant

    @aitpro

    Yep no problem. When other folks see that you confirmed that something works then that helps them out if they have this question/issue. 😉 Thanks.

    Plugin Author AITpro
    Participant

    @aitpro

    @revery123 – resolving this thread. If this code above does not work then unresolve this thread. Thanks.

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘[Resolved] Redirects from Blogger giving a 403 error’ is closed to new replies.