WordPress.org

Ready to get started?Download WordPress

Forums

All In One WP Security & Firewall
[resolved] htaccess security rules blocking LinkedIn sharing (7 posts)

  1. Viktor Nagornyy
    Member
    Posted 10 months ago #

    Seems that something in the htaccess rules is blocking LinkedIn sharing. This is what it looks like: http://i.imgur.com/rW51ZE8.png

    Going back to default WP htaccess fixes the problem. Note, that if you switch back again to htaccess with security rules, sharing will work for few hours and then again stop working.

    Would like to figure out what's causing it.

    http://wordpress.org/plugins/all-in-one-wp-security-and-firewall/

  2. Viktor Nagornyy
    Member
    Posted 10 months ago #

    Luckily, I was able to guess which part is causing LinkedIn sharing to not work:

    # 5G:[USER AGENTS]
    <IfModule mod_setenvif.c>
    # SetEnvIfNoCase User-Agent ^$ keep_out
    SetEnvIfNoCase User-Agent (binlar|casper|cmsworldmap|comodo|diavol|dotbot|feedfinder|flicky|ia_archiver|jakarta|kmccrew|nutch|planetwork|purebot|pycurl|skygrid|sucker|turnit|vikspider|zmeu) keep_out
    <limit GET POST PUT>
    Order Allow,Deny
    Allow from all
    Deny from env=keep_out
    </limit>
    </IfModule>

    Not sure which bot blocks LinkedIn, but commenting out this entire portion makes LinkedIn sharing work again.

    Seems that this might be a bug.

  3. wpsolutions
    Member
    Plugin Author

    Posted 10 months ago #

    No it's not a bug.

    What is the "linkedIn" plugin you are using called?

    When implementing security directives using .htaccess there is not really a "one size fits all".
    Individual sites might have slightly different setups or they may be using different plugins which sometimes get caught in the security net.

    Before tweaking or changing any of the rules we always ensure that we aren't opening a hole for the rest of the users in order to satisfy a few who are having specific blockages.

    For now I would suggest you leave 5G blacklist rules disabled and we will investigate if the rules can be modified.

  4. Viktor Nagornyy
    Member
    Posted 10 months ago #

    This site has Jetpack enabled, and using social sharing buttons that come with it. I tried testing with a regular linkedin sharing button, which was doing the same thing.

  5. mbrsolution
    Member
    Posted 10 months ago #

    Hello @viktorix I have being running this plugin on one of my sites that also uses a social media plugin. My Linkedin has been working well with this plugin since I installed it a few weeks ago.

    I know for a fact that even though Jetpack is a very powerful plugin and it has a lot to offer, it also causes some issues for many with other plugins. In some cases some of the tools that Jetpack offers can not be implemented.

    I just thought of sharing.

    Kind regards

  6. GraphanixDziner
    Member
    Posted 5 months ago #

    Hello, Anybody still looking for a solution to this problem I might have a solution for you. Linkedin bot, http://www.botopedia.org/user-agent-list/social-media-agents/linkedin-bot.html is a Jakarta Commons-HttpClient, therefore if you remove the jakarta block in your code linkedin should work perfectly.

    Your Current Code:

    # 5G:[USER AGENTS]
    <IfModule mod_setenvif.c>
    # SetEnvIfNoCase User-Agent ^$ keep_out
    SetEnvIfNoCase User-Agent (binlar|casper|cmsworldmap|comodo|diavol|dotbot|feedfinder|flicky|ia_archiver|jakarta|kmccrew|nutch|planetwork|purebot|pycurl|skygrid|sucker|turnit|vikspider|zmeu) keep_out
    <limit GET POST PUT>
    Order Allow,Deny
    Allow from all
    Deny from env=keep_out
    </limit>
    </IfModule>

    The revised code:

    # 5G:[USER AGENTS]
    <IfModule mod_setenvif.c>
    # SetEnvIfNoCase User-Agent ^$ keep_out
    SetEnvIfNoCase User-Agent (binlar|casper|cmsworldmap|comodo|diavol|dotbot|feedfinder|flicky|ia_archiver|kmccrew|nutch|planetwork|purebot|pycurl|skygrid|sucker|turnit|vikspider|zmeu) keep_out
    <limit GET POST PUT>
    Order Allow,Deny
    Allow from all
    Deny from env=keep_out
    </limit>
    </IfModule>

    Hope this helps.

    Other version of this in your htacces could be the following
    SetEnvIfNoCase User-Agent "Jakarta Commons" keep_out

    Just comment it out or delete it.

  7. kendawes
    Member
    Posted 4 months ago #

    That Botpedia is a great resource GraphanixDziner! I've not run into it before. Thanks for sharing!!!

Reply

You must log in to post.

About this Plugin

About this Topic