rewrite extension
// its a redirect [R] and it is is permanent (code is 301)
RewriteEngine On RewriteBase /the_directory RewriteRule ^(.*).html$ $1.php [R=301]
Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world (or not, you can keep them private!)
RewriteEngine On RewriteBase /the_directory RewriteRule ^(.*).html$ $1.php [R=301]
#!/bin/sh /usr/bin/grep CustomLog /usr/local/etc/apache2/httpd.conf |/usr/bin/grep -v \#|/usr/bin/awk '{print $2}'|/usr/bin/sort|/usr/bin/uniq|/usr/bin/grep -v /var/log > logfiles /usr/bin/grep ErrorLog /usr/local/etc/apache2/httpd.conf |/usr/bin/grep -v \#|/usr/bin/awk '{print $2}'|/usr/bin/sort|/usr/bin/uniq|/usr/bin/grep -v /var/log >> logfiles /usr/local/bin/weblog_rotate.pl --loglist logfiles --touchlog --restart_cmd "/usr/local/etc/rc.d/apache2.sh restart" --compress --days 120
AddHandler fcgid-script .php <Directory /home/elitesys/elite-systems.org/html> FCGIWrapper /home/elitesys/elite-systems.org/html/php.fcgi .php </Directory> IPCConnectTimeout 20 IPCCommTimeout 300
#!/bin/sh PHPRC="/usr/php4/etc" export PHPRC PHP_FCGI_CHILDREN=4 export PHP_FCGI_CHILDREN PHP_FCGI_MAX_REQUESTS=5000 export PHP_FCGI_MAX_REQUESTS exec /usr/php4/bin/php
<IfModule mod_deflate.c> #General Configuration settings: use ratio method and highest compression DeflateFilterNote ratio DeflateCompressionLevel 9 #Approach 1: Implicit ("Set") compression ## There are potential issues with compressing everything ## It will for example send xml compressed to web services or flash #SetOutputFilter DEFLATE #SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary #SetEnvIfNoCase Request_URI \.(?:exe|t?gz|zip|bz2|sit|rar)$ no-gzip dont-vary #SetEnvIfNoCase Request_URI \.pdf$ no-gzip dont-vary #SetEnvIfNoCase Request_URI \.avi$ no-gzip dont-vary #SetEnvIfNoCase Request_URI \.mov$ no-gzip dont-vary #SetEnvIfNoCase Request_URI \.mp3$ no-gzip dont-vary #SetEnvIfNoCase Request_URI \.mp4$ no-gzip dont-vary #SetEnvIfNoCase Request_URI \.rm$ no-gzip dont-vary ##Approach 2: Explicit ("Add") compression by mime-type AddOutputFilterByType DEFLATE application/x-httpd-php AddOutputFilterByType DEFLATE application/x-httpd-fastphp AddOutputFilterByType DEFLATE application/x-httpd-eruby AddOutputFilterByType DEFLATE text/html # Or by extension # AddOutputFilter DEFLATE html AddOutputFilterByType DEFLATE text/plain AddOutputFilterByType DEFLATE text/xml AddOutputFilterByType DEFLATE application/xhtml+xml AddOutputFilterByType DEFLATE text/css AddOutputFilterByType DEFLATE application/xml AddOutputFilterByType DEFLATE image/svg+xml AddOutputFilterByType DEFLATE application/rss+xml AddOutputFilterByType DEFLATE application/atom_xml AddOutputFilterByType DEFLATE application/x-javascript # Implicit compression on the way in SetInputFilter DEFLATE # Explicit compression on the way in, there is no AddInputFilterByType # AddInputFilter DEFLATE html </IfModule>
ProxyPass / balancer://app <Proxy balancer://app> BalancerMember http://10.0.0.166:8181 BalancerMember http://10.0.0.166:8182 BalancerMember http://10.0.0.166:8183 BalancerMember http://10.0.0.166:8184 BalancerMember http://10.0.0.166:8185 BalancerMember http://10.0.0.166:8186 BalancerMember http://10.0.0.166:8187 BalancerMember http://10.0.0.166:8188 BalancerMember http://10.0.0.166:8189 BalancerMember http://10.0.0.166:8190 </Proxy>
ProxyPass / balancer://app <Proxy balancer://app> BalancerMember http://10.0.0.166:8181/ BalancerMember http://10.0.0.166:8182/ BalancerMember http://10.0.0.166:8183/ BalancerMember http://10.0.0.166:8184/ BalancerMember http://10.0.0.166:8185/ BalancerMember http://10.0.0.166:8186/ BalancerMember http://10.0.0.166:8187/ BalancerMember http://10.0.0.166:8188/ BalancerMember http://10.0.0.166:8189/ BalancerMember http://10.0.0.166:8190/ </Proxy>
ProxyPass / balancer://app/ <Proxy balancer://app/> BalancerMember http://10.0.0.166:8181/ BalancerMember http://10.0.0.166:8182/ BalancerMember http://10.0.0.166:8183/ BalancerMember http://10.0.0.166:8184/ BalancerMember http://10.0.0.166:8185/ </Proxy>
RewriteEngine On RewriteCond %{HTTP_REFERER} ^http://(www\.)?evilwebsite\.com [NC,OR] RewriteCond %{HTTP_REFERER} ^http://forum\.evilwebsite\.com [NC,OR] RewriteCond %{HTTP_REFERER} ^http://(www\.)?bandwidththieves\.net [NC] RewriteRule \.(jpeg|jpg|gif|bmp|png|JPEG|JPG|GIF|BMP|PNG)$ http://example.com/pwnt.gif [L]
example.com/pwnt.gifis the location of the file you want to serve in place of the hotlinked image. Mine just says 'PWNT'.
RewriteRule \.(jpeg|jpg|gif|bmp|png|JPEG|JPG|GIF|BMP|PNG)$ - [F]
AddHandler application/x-httpd-php .html
<IfModule !mod_php4.c> <FilesMatch "\.php$"> Order allow,deny Deny from all Allow from none </FilesMatch> </IfModule>
Failed to apply changes : [Fri Nov 18 05:06:50 2005] [notice] suEXEC mechanism enabled (wrapper: /usr/local/sbin/suexec) [Fri Nov 18 05:06:52 2005] [notice] FastCGI: wrapper mechanism enabled (wrapper: /usr/local/sbin/suexec) [Fri Nov 18 05:06:52 2005] [notice] FastCGI: process manager initialized (pid 77504) [Fri Nov 18 05:06:52 2005] [notice] Digest: generating secret for digest authentication ... [Fri Nov 18 05:06:52 2005] [notice] Digest: done
# let Apache recognize the ".php" extension AddType application/x-httpd-php .php DefaultType application/x-httpd-php # make php use this very uncool default charset I had been using for years php_value default_charset iso-8859-1 # make php define old style global variables php_flag register_long_arrays On # stop Apache from spewing "Charset: utf-8" AddDefaultCharset Off # stop Apache from silently mangling urls CheckSpelling Off # stop Apache from denying perfectly legitimate requests SecFilterEngine Off