1
|
DirectoryIndex index.html index.php index.htm
|
1
|
ErrorDocument 404 errors/404.html
|
1
|
ErrorDocument 404 /psych/cgi-bin/error/error?404
|
1
2
|
# no one gets in here!
deny from all
|
1
2
3
4
5
6
|
# no nasty crackers in here!
order deny,allow
deny from all
allow from 192.168.0.0/24
# this would do the same thing..
#allow from 192.168.0
|
1
2
3
4
|
# someone else giving the ruskies a bad name..
order allow,deny
deny from 83.222.23.219
allow from all
|
1
2
3
4
|
SetEnv SITE_WEBMASTER "Jack Sprat"
SetEnv SITE_WEBMASTER_URI mailto:[email protected]
UnSetEnv REMOTE_ADDR
|
1
|
Redirect 301 /old/file.html http://yourdomain.com/new/file.html
|
1
|
RedirectMatch 301 /blog(.*) http://yourdomain.com/$1
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
# year
<
FilesMatch
"\.(ico|pdf|flv|jpg|jpeg|png|gif|swf|mp3|mp4)$">
Header set Cache-Control "public"
Header set Expires "Thu, 15 Apr 2010 20:00:00 GMT"
Header unset Last-Modified
</
FilesMatch
>
#2 hours
<
FilesMatch
"\.(html|htm|xml|txt|xsl)$">
Header set Cache-Control "max-age=7200, must-revalidate"
</
FilesMatch
>
<
FilesMatch
"\.(js|css)$">
SetOutputFilter DEFLATE
Header set Expires "Thu, 15 Apr 2010 20:00:00 GMT"
</
FilesMatch
>
|
1
2
3
4
5
6
7
8
9
10
|
<
IfModule
mod_gzip.c>
mod_gzip_on Yes
mod_gzip_dechunk Yes
mod_gzip_item_include file \.(html?|txt|css|js|php|pl)$
mod_gzip_item_include handler ^cgi-script$
mod_gzip_item_include mime ^text/.*
mod_gzip_item_include mime ^application/x-javascript.*
mod_gzip_item_exclude mime ^image/.*
mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*
</
IfModule
>
|
1
2
3
4
5
6
7
|
<
Location
>
SetOutputFilter DEFLATE
SetEnvIfNoCase Request_URI \
\.(?:gif|jpe?g|png)$ no-gzip dont-vary
SetEnvIfNoCase Request_URI \
\.(?:exe|t?gz|zip|gz2|sit|rar)$ no-gzip dont-vary
</
Location
>
|
1
2
3
|
<
FilesMatch
"\.(txt|html|htm|php)">
php_value output_handler ob_gzhandler
</
FilesMatch
>
|
1
2
3
|
RewriteEngine On
RewriteCond %{HTTPS} !on
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
|
1
2
|
RewriteEngine on
RewriteRule ^product-([0-9]+)\.html$ product.php?id=$1
|
1
2
|
RewriteEngine on
RewriteRule ^product/([a-zA-Z0-9_-]+)/([0-9]+)\.html$ product.php?id=$2
|
1
2
3
|
RewriteEngine On
RewriteCond %{HTTP_HOST} ^viralpatel\.net$
RewriteRule (.*) http://www.viralpatel.net/$1 [R=301,L]
|
1
2
3
|
RewriteEngine On
RewriteRule ^([a-zA-Z0-9_-]+)$ user.php?username=$1
RewriteRule ^([a-zA-Z0-9_-]+)/$ user.php?username=$1
|
1
2
3
4
5
|
RewriteEngine On
RewriteCond %{HTTP_HOST} ^test\.com$ [OR]
RewriteCond %{HTTP_HOST} ^www\.test\.com$
RewriteCond %{REQUEST_URI} !^/new/
RewriteRule (.*) /new/$1
|
1
|
Options -Indexes
|
1
|
IndexIgnore *
|
1
2
3
|
AddType application/x-endnote-connection enz
AddType application/x-endnote-filter enf
AddType application/x-spss-savefile sav
|
1
2
3
4
|
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{REQUEST_URI} !^/(wp-login.php|wp-admin/|wp-content/plugins/|wp-includes/).* [NC]
RewriteCond %{HTTP_REFERER} !^http://www.askapache.com.*$ [NC]
RewriteRule \.(ico|pdf|flv|jpg|jpeg|mp3|mpg|mp4|mov|wav|wmv|png|gif|swf|css|js)$ - [F,NS,L]
|
1
2
3
4
|
php_value upload_max_filesize 20M
php_value post_max_size 20M
php_value max_execution_time 200
php_value max_input_time 200
|
1
2
|
Options -ExecCGI
AddHandler cgi-script .php .pl .py .jsp .asp .htm .shtml .sh .cgi
|
1
2
|
AddDefaultCharset UTF-8
DefaultLanguage en-US
|
1
|
SetEnv TZ America/Indianapolis
|
1
|
AddType application/octet-stream .avi .mpg .mov .pdf .xls .mp4
|
1
2
3
4
5
6
7
8
9
10
11
|
<
Files
quiz.html>
order deny,allow
deny from all
AuthType Basic
AuthName "Characterology Student Authcate"
AuthLDAP on
AuthLDAPServer ldap://directory.characterology.com/
AuthLDAPBase "ou=Student, o=Characterology University, c=au"
require valid-user
satisfy any
</
Files
>
|
1
|
Header set Set-Cookie "language=%{lang}e; path=/;" env=lang
|
1
2
3
|
RewriteEngine On
RewriteBase /
RewriteRule ^(.*)(de|es|fr|it|ja|ru|en)/$ - [co=lang:$2:.yourserver.com:7200:/]
|
1
2
3
4
|
Header set P3P "policyref=\"http://www.askapache.com/w3c/p3p.xml\""
Header set X-Pingback "http://www.askapache.com/xmlrpc.php"
Header set Content-Language "en-US"
Header set Vary "Accept-Encoding"
|
1
2
3
|
SetEnvIfNoCase ^User-Agent$ .*(craftbot|download|extract|stripper|sucker|ninja|clshttp|webspider|leacher|collector|grabber|webpictures) HTTP_SAFE_BADBOT
SetEnvIfNoCase ^User-Agent$ .*(libwww-perl|aesop_com_spiderman) HTTP_SAFE_BADBOT
|