htaccess Tricks #8 – Random Tricks
Activate SSI for HTML/SHTML file types:
# activate SSI for HTML and or SHTML file types
AddType text/html .html
AddType text/html .shtml
AddHandler server-parsed .html
AddHandler server-parsed .shtml
AddHandler server-parsed .htm
Grant CGI access in a specific directory:
# grant CGI access in a specific directory
Options +ExecCGI
AddHandler cgi-script cgi pl
# to enable all scripts in a directory use the following
SetHandler cgi-script
Disable magic_quotes_gpc for PHP enabled servers:
# turn off magic_quotes_gpc for PHP enabled servers
<ifmodule mod_php4.c>
php_flag magic_quotes_gpc off
</ifmodule>
Enable MD5 digests:
Note: enabling this option may result in a relative decrease in server performance.
# enable MD5 digests via ContentDigest
ContentDigest On
Expression Engine Tricks:
# send Atom and RSS requests to the site docroot to be rewritten for ExpressionEngine
RewriteRule .*atom.xml$ http://www.yoursite.com/index.php/weblog/rss_atom/ [R]
RewriteRule .*rss.xml$ http://www.yoursite.com/index.php/weblog/rss_2.0/ [R]
# cause all requests for index.html to be rewritten for ExpressionEngine
RewriteRule /.*index.html$ http://www.domain.com/index.php [R]
Related Posts:
Tags: htaccess, random, Tricks
18.Oct.08
Server
You can leave a response, or trackback from your own site.