List Bad Crawler / Bot / Spider and How to block it from . Htaccess

Posted by: Admin  :  Category: Web Hosting

Linux Cpanel shared hosting: 600 GB disk space, 6 TB bandwidth, free domain, unlimited databases and ftp accounts, web hosting cheap and pro at Hostony

ome sort of web companies in the world use the google bot to gather information sites that are on the internet , that can be found on their search applications . But there are some who use bots to crime , such as illegal take ( scrapping / crawler ) website content or take e – mail address for spamming purposes . There are also types of bots used to DDOS action , which of course spend bandwidth and detrimental to the website owner .
Find Articles, Free Articles Directory | Web Hosting Articles

Linux Cpanel shared hosting: 600 GB disk space, 6 TB bandwidth, free domain, unlimited databases and ftp accounts, web hosting cheap and pro at Hostony

Add your Dynamic IPs to Apache HTACCESS files

Posted by: Admin  :  Category: Web Hosting

Hello!

We threw together a quick & simple script to dynamically update your .htaccess files within apache to add your dynamic IP address to the allow / deny fields.

If you’re looking to password protect an admin area (for example) but your office only has a dynamic IP address, then this script might be handy for you.

Its an extremely simple script that polls your dynamic hostname (if you use no-ip.org or dyndns.org for example) every 15 minutes as a cron job and, if it has changed, updates the .htaccess file

Hopefully it will make your life just a little bit easier :)

Sample Cron entry :

*/15 * * * * /bin/sh /usr/local/bin/htaccessdynamic.sh yourhostname.dyndns.org /var/www/website.com/public_html/.htaccess > /dev/null 2>&1

And now the script :

#!/bin/bash
# Dynamic IP .htaccess file generator
# Written by Star Dot Hosting
# www.stardothosting.com

dynDomain="$  1"
htaccessLoc="$  2"

dynIP=$  (/usr/bin/dig +short $  dynDomain)

echo "dynip: $  dynIP"
# verify dynIP resembles an IP
if ! echo -n $  dynIP | grep -Eq "[0-9.]+"; then
    exit 1
fi

# if dynIP has changed
if ! cat $  htaccessLoc | /bin/grep -q "$  dynIP"; then

        # grab the old IP
        oldIP=`cat /usr/local/bin/htold-ip.txt`

        # output .htaccess file
        echo "order deny,allow" > $  htaccessLoc 2>&1
        echo "allow from $  dynIP" >> $  htaccessLoc 2>&1
        echo "allow from x.x.x.x" >> $  htaccessLoc 2>&1
        echo "deny from all" >> $  htaccessLoc 2>&1

        # save the new ip to remove next time it changes, overwriting previous old IP
        echo $  dynIP > /usr/local/bin/htold-ip.txt
fi

DiggTwitterRedditDeliciousShare

*.hosting

Redirecting Web Pages with .htaccess

Posted by: Admin  :  Category: Web Hosting

There are many different things that you need to be aware of when it comes to successful web hosting and web site management. No matter what you are trying to do with the site, you need to have traffic coming to your site.
Find Articles, Free Articles Directory | Web Hosting Articles

Subdomain as PHP variable, PHP, cPanel, .htaccess – working correctly in less than 7 minutes

Posted by: Admin  :  Category: Cpanel

here are files .htaccess and index.php from video : .htaccess: ——————————————- RewriteEngine on RewriteCond %{HTTP_HOST} !^www.your_domain.com RewriteCond %{HTTP_HOST} ^([^.]+).your_domain.com RewriteRule ^$ /index.php?name=%1 [L] ——————————————- index.php: ——————————————-(open php tag) echo $ _GET[‘name’]; ——————————————-(close php tag) i hope it will helps you, here is text version of tutorial too : ——————————————– ——————————————– 1. Add domain to cPanel. 2. Add subdomain called “*.your_domain.com”. 3. Create file .htaccess contains : PHP Code: RewriteEngine on RewriteCond %{HTTP_HOST} !^www.your_domain.com RewriteCond %{HTTP_HOST} ^([^.]+).your_domain.com RewriteRule ^$ /index.php?name=%1 [L] 4. Create file index.php contains : PHP Code: (open php tag) echo $ _GET[‘name’]; (close php tag) 5. open adres www.Test_subdomain.your_domain.com