rofl cake
Well-Known Member
- May 25, 2015
- 204
- 451
- 108
I don't take credit for this informatic tutorial. This was translated and posted here to help gain more incite on .htaccess.
Tutorial by: ACCO2@turkhackteam
SOURCE:
If you want to block all access to a folder (for example, you might have a folder that contains your program source code, in this case, the folder is not on the internet, you may only want to access the file system) in the folder .htaccess file to create inside / /
Simply write.If you want the IP address you specify only that folder or rope to be accessed by the block
Simply write.To block access to a single file that you need to write is:
2. Folder List
If you want to list the files in a folder, you type the following in the .htaccess file:
This is supposed to be installed on your server for Autoindex module.To cancel the default folder listing in this line is sufficient:
3. Compression
The site's bandwidth (bandwidth) can use to protect data compression feature, which is a php. You must add the following to the .htaccess file:
4. Hide Files
You can use the Regular Expression Files with directives to block access to certain files.For example, the configuration file, you may want to block access to robots.txt or login.It impedes access to the file folders starting with .ht in the following example.
5. Custom HTTP 404 Error Page
Visitors are "404: Page Not Found" error to ensure that they would meet with you directly to a file you want to use the following code:
Wipe points.//
This way you can customize other error codes.Caution!When faced with Internet Explorer error page is less than 512 bytes, its error page where the link shows such as MSN search users.Make sure that the error is greater 512B't page you specify.
6. Block to Hotlinking
Hotlinking is simply a picture of your site, the video is called to show to another site.In this case, that would be your bandwidth. Access to certain files that are used outside of your site as an example the following code sends blocking an image file named nohotlink.gif look:
Note: If you are using a service like FeedBurner In this case, for example, you will need to change your code for this service.
7. Block the Bad Boots
You can use the .htaccess file bots who want to use your site or to download completely:
8. Support for non-www
You also against the use of the site in the www subdomain If this code will do the trick:
Tutorial by: ACCO2@turkhackteam
SOURCE:
Code:
http://www.turkhackteam.org/web-server-guvenligi/987412-htaccess-detayli-anlatim.html
1. Access to the folderHello friends, I will try to explain how to of .htaccess and provide more information about this file. This extension is found in apache server (.htaccess) placed to the webpage Apache server and .htaccess is the file that determines the access privileges.
// One note: ".htaccess (Hypertext Access), which allows the Apache folder level settings, configuration files are files that customize directives in general." //
// Note Two: ".htaccess" we recommend that you be very careful when using. Below are the most widely used to you ".htaccess" We derivatives. //
If you want to block all access to a folder (for example, you might have a folder that contains your program source code, in this case, the folder is not on the internet, you may only want to access the file system) in the folder .htaccess file to create inside / /
Code:
#deny All Access Code: deny from Order
Code:
#deny All Access
Code:
deny from all
allow from a single IP address 10.0.0.1 #
allow from 192.168.0.0/24 # ip block
Code:
Order allow, deny
Code:
Deny from all
2. Folder List
If you want to list the files in a folder, you type the following in the .htaccess file:
Code:
+ Options + Indexes FollowSymLinks MultiViews +
Code:
IndexOptions FancyIndexing
Code:
IndexIgnore *
3. Compression
The site's bandwidth (bandwidth) can use to protect data compression feature, which is a php. You must add the following to the .htaccess file:
Code:
php_value zlib.output_compression of 16386
4. Hide Files
You can use the Regular Expression Files with directives to block access to certain files.For example, the configuration file, you may want to block access to robots.txt or login.It impedes access to the file folders starting with .ht in the following example.
Code:
Order allow, deny
Code:
Deny from all Satisfy All
5. Custom HTTP 404 Error Page
Visitors are "404: Page Not Found" error to ensure that they would meet with you directly to a file you want to use the following code:
Code:
errord.occument 404 /errors/notfound.html
This way you can customize other error codes.Caution!When faced with Internet Explorer error page is less than 512 bytes, its error page where the link shows such as MSN search users.Make sure that the error is greater 512B't page you specify.
6. Block to Hotlinking
Hotlinking is simply a picture of your site, the video is called to show to another site.In this case, that would be your bandwidth. Access to certain files that are used outside of your site as an example the following code sends blocking an image file named nohotlink.gif look:
Code:
RewriteEngine on
Code:
RewriteCond% {HTTP_REFERER}! ^ $
RewriteCond% {HTTP_REFERER}! ^ [- a-z0-9] + \.)? your site \ .com [NC]
RewriteRule. * \. (zip | mp3 | avi | wmv | mpg | mpeg) $ [R, NC, L]
7. Block the Bad Boots
You can use the .htaccess file bots who want to use your site or to download completely:
Code:
RewriteEngine On
8. Support for non-www
You also against the use of the site in the www subdomain If this code will do the trick:
Code:
Options + FollowSymLinks
Code:
RewriteEngine on RewriteCond% {HTTP_HOST} ^ www \ .example \ .com [NC] RewriteRule ^ (. *) $ http://example.com/$1 [R = 301, nc]
Last edited: