Disabling indexing of (spam) subdomains

Drupal will respond to any random subdomain like http://dfkasdf.giraffesdoexist.com/ with your normal site. Sometimes spammers and scammers use this feature for whatever reasons they might have and Google (or Yandex along with other search engines) will index these causing confusion, page duplicates and other nasty SEO-unfriendly effects. This can be fixed by modifying robots.txt file on the fly to include Disallow directive as follows:
Disallow: / #disable whole site indexing
On Apache this is done by a few tweaks:
    Rating: 

    Free SSL certificate for your site and routing all traffic through HTTPS - Step by step walkthrough

    Security is all the hype with Google threatening to mark all sites not using SSL protocol as "insecure" or "unsecure" or whatever "non-secure" message it's going to show. Something like this:

    So let's make it this site great secure again. Don't buy the certificate from your hoster just yet, if you are a small(-ish) website, you don't have to spend a penny. The things you'll need:

    Rating: 

    Bash script to block brute force attacks with .htaccess

    Your site is under attack. May be not right now, but several times a day. Password guessing, security vulnerabilities - that kind of stuff. In the error log it looks like this:

    Rating: 

    Disabling outgoing voicemail calls in Android (rooted phone).

    Android dialer call and voicemail buttons
    Android: Voicemail number not set

    I hate voicemail. It's usually a total waste of time and money as the message itself tends to be "call me back at the number you already have" so I usually disable voicemail as a feature. This actually means that incoming calls are not forwarded to your voicemail. Seems like a problem solved only until I got a smartphone that has voicemail button right next to call button:
    Android dialer call and voicemail buttons

    Rating: 

    Ip address blocking service.

    IpBlock EventViewer log entries

    While experimenting with hosting options I tried an Amazon Cloud virtual machine among others to test hosting performance and ease of setting up Drupal on Windows compared to Linux shared hosting I use usually. Familiar Windows environment was pleasantly easy to configure, but failed to impress with server performance. After thorough disk space cleanup and uninstalling of extra applications I stumbled upon Event Log records of Brute Force attack attempts (Event Id 4625) that look similar to:

    Rating: 

    Similar nodes in Drupal 7 using Views

    Настройка представления похожих документов в Друпал 7
    Настройка представления похожих документов в Друпал 7

    Internal links are important part of Search Engine Optimization. A common use of automatic internal links is "Similar articles" section suggesting pages with the same tags as the current one. For Drupal there's a module that does just that called Similar by Terms. Unfortunately the version for Drupal 7 is not in working state at the moment and I could not manage to utilize it.

    Rating: 

    Drupal 7. Recover, unblock admin account blocking after 5 failed login attempts.

    If you get this message:
    :Sorry, there have been more than 5 failed login attempts for this account. It is temporarily blocked. Try again later or request a new password."
    after some failed login attempts and want to recover access to your site then you can do this via SQL using phpMyAdmin for example.

    Rating: 

    XSLT transformation that returns value and inner xml

    Question: When transforming XML with XSLT how can I get inner value of tag including inner tags?

    Suppose you have this XML:

    <Root>SomeValue
      <Name>SomeName</Name>
      <Desc>SomeDesc</Desc>
    </Root>
    

    And you want to get the following result:

    SomeValue
      <Name>SomeName</Name>
      <Desc>SomeDesc</Desc>
    

    The XSLT transformation could be like this:

    Rating: 

    "Unable to send e-mail. Please contact the site admin, if the problem persists" Drupal error.

    Among other possible causes including your hoster's settings you can get this error if your site name (Configuration->Site Information->Site name) contains non-English characters. Specifically because Drupal (as of version 7.14) handles [site:name] token incorrectly when constructing subject field for outgoing emails.

    Rating: 

    Adding OpenId Delegation to Drupal 7 site.

    Further to reading about getting nice OpenId for your site you might wonder "How do I add those two lines to my Drupal site <head> section?" Forget about installing additional modules - they have very little chance of being supported in the next Drupal release. Instead, read on and see how easy it is to do this yourself.

    Rating: 

    Pages

    Subscribe to giraffes do exist RSS