Welcome To Snipplr


Everyone's Recent Snippets Tagged htaccess



If you've transferred domain names or wish to redirect a specific page or pages without getting penalty from search engines such as Google, use the following code:
2 1009 posted 15 years ago by Orlandoo
If for some reason you would want to deny everyone or allow only a specific group of IP addresses to access your website, add the following code to your .htaccess file:
3 1352 posted 15 years ago by Orlandoo
It's possible to block all unwanted user agents that might be potentially harmful or perhaps just to keep the server load as low as possible.
1 1108 posted 15 years ago by Orlandoo
Tired of people using your bandwidth by putting the images hosted on your server on their website? Add the following code at the bottom of your .htaccess file to prevent hotlinking.
4 1344 posted 15 years ago by Orlandoo
This code redirects all external traffic (all traffic not belonging to a particular ip) to a temp page. This is useful for performing site maintenance.
2 1312 posted 15 years ago by BFTrick
Add this to your .htaccess file to make PHP5 the default version on Netcologne (Germany) Webspace.
0 1306 posted 15 years ago by mountbatt
Make file not found redirect to new host.
2 1338 posted 15 years ago by pntruongphuc
This is if you have multiple domains pointed to the same directory on a server.
1 1222 posted 15 years ago by batfan
Placing this in a .htaccess file in a sub folder you disable password security for this folder.
2 2263 posted 15 years ago by arnekolja
<p>Method 1</p> <p>The -c directive creates a file .htpass in the directory somepath/outside/of/root/ containing a username user1. The -b directive means you must supply the password password1 at the command line when running the command - not rec...
3 1381 posted 15 years ago by beneberle
Put this in an .htaccess file to protect the directory it is in and anything below it. This requires that a file named .passwdfile exists in the directory \\\"/full/path/to/\\\" and contains at least one username/password combination.\\r\\n\\r\\nUse...
2 1183 posted 15 years ago by beneberle
This conent points the user to a certain file or directory based on his language settings
0 962 posted 15 years ago by steho
2 1265 posted 15 years ago by steho
# minimize image flicker in IE6
0 1112 posted 15 years ago by steho
## If visitor calls directory only, i.e. /en/ ## he will be forwarded to the index.php in this folder ## as directory listing is deactivated
0 1215 posted 15 years ago by steho
Changes domainname.tld into www.domainname.tld
1 1099 posted 15 years ago by steho
Protects htaccess file to be read
0 1132 posted 15 years ago by steho