Add the below given code in your .htaccess file
RewriteEngine On
RewriteBase /
RewriteCond %{THE_REQUEST} !^[A-Z]{3,9} [a-zA-Z0-9.+_/-?=&]+ HTTP/ [NC]
RewriteRule .* – [F,NS,L]
Add the below given code in your .htaccess file
RewriteEngine On
RewriteBase /
RewriteCond %{THE_REQUEST} !^[A-Z]{3,9} [a-zA-Z0-9.+_/-?=&]+ HTTP/ [NC]
RewriteRule .* – [F,NS,L]
Add the below given code in your .htaccess file
RewriteEngine on
# Options +FollowSymlinks
RewriteCond %{HTTP_REFERER} referer_domain.com [NC]
RewriteRule .* – [F]
Note : Make sure that you have enabled the module “mod_rewrite” in your server
Add the below given code in your .htaccess file
order allow,deny
deny from 112.1.11.22
allow from all
Create .htaccess file and paste the below given code into it .
AuthName “Member’s Area Name”
AuthUserFile /path/to/password/file/.htpasswd // Dont for got give a valid path of .htpasswd file
AuthType Basic
require valid-user
Create .htpasswd and gienterve the user name and encrypted password separated with ‘:’. The text would look like as follows
username:encryptedpassword
phpcodez:60h5w63DqQfls
NOTE : You can create the password using the link “http://www.4webhelp.net/us/password.php”
Paste the following code in your .htaccess file
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_METHOD} POST
RewriteCond %{REQUEST_URI} .wp-comments-post.php*
RewriteCond %{HTTP_REFERER} !.*phpcodez.* [OR] // please add your domain name
RewriteCond %{HTTP_USER_AGENT} ^$
RewriteRule (.*) ^http://%{REMOTE_ADDR}/$ [R=301,L]
</IfModule>
You can hide the php file extension using .htaccess so that you can confuse the spammers and hackers .
You can use “asp” file to work as a “php” file ie use the extension “asp” for yourr file instead of “php”.
You jsut need to cerate a .htaccess file and ad the code shown below
# Make PHP code look like asp or perl code
AddType application/x-httpd-php .asp
After this create file “comment.asp” and with php codes in it.
Then load the page “comment.asp”
We can cache the file using htaccess so that we can improve the perfomace of a website General Format <FilesMatch “.(Extenstion of the file to be cached)$”> Header set Cache-Control “max-age=cache time″ </FilesMatch> Example <FilesMatch “.(html|htm)$”> Header set Cache-Control “max-age=43200″ </FilesMatch
RewriteEngine on
Options +FollowSymLinks
RewriteCond %{HTTP_HOST} ^www.domain.tld$ [NC]
RewriteRule ^(.*)$ http://domain.tld/$1 [R=301,L]
Add the below given code in your .htaccess file
RedirectMatch 301 ^/category/(.+)$ http://www.askapache.com/$1 #
OR
RewriteRule ^category/(.+)$ http://www.askapache.com/$1 [R=301,L]
Add the code “SetEnv TZ America/Los_Angeles” in your htaccess file