Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Set default directory file
- #Load index.html if not found find index.php etc.
- DirectoryIndex index.html index.php
- #Error pages
- ErrorDocument 404 "Not found"
- ErrorDocument 404 /error.html
- #Enable Directory Listing (default)
- Options +Indexes
- #Disable Directory Listing (403 Forbidden)
- Options -Indexes
- #Enable Directory Listing but hide files
- #Hide all files
- IndexIgnore *
- #Hide specific files
- IndexIgnore *.jpg *.txt
- #Block access from IP
- #Allow all except some
- Order Allow, Deny
- allow all
- deny from 123.45.6.7
- deny from 12.34.5
- #Deny all except some
- Order Deny, Allow
- deny all
- allow from 192.168.0.0/24
- allow from 10.0.0
- Flags:
- NC => no case / case insensitive
- F => Forbidden
- #Turn on rewrite engine before rewrite rules declared
- RewriteEngine On
- #Redirecting pages=> oldurl newurl [flags]
- RewriteRule ^example.html$ domain/newexample.html [R=301]
- #Block visitors \w certain referers
- RewriteCond %{HTTP_REFERER} example\.com [NC]
- RewriteRule .* - [F]
Advertisement
RAW Paste Data
Copied
Advertisement