Pages: 1 2 3 4 5 6 7 8 9 10 >>
Create a .htaccsss file containing the following lines:
RemoveHandler .html .htm
AddType application/x-httpd-php .php .htm .html
Create a file at /etc/httpd/conf.d/no-etags.conf with the following:
Header unset ETag
FileETag None
Then of course restart Apache.
Here's a discussion on why you may want to turn ETags off:
Here's a good rule set for forcing use of a preferred url:
RewriteCond %{HTTP_HOST} !^desired\.domain\.name(:.*)?$ [NC]
RewriteCond %{HTTP_HOST} !^$
RewriteRule ^/(.*) http://desired.domain.name/$1 [L,R=301]
This version of the canonical rewrite expands on the original found here:
http://httpd.apache.org/docs/2.2/rewrite/rewrite_guide.html#canonicalhost
by adding:
as suggested here:
and by using a 301 redirect as recommended by Google here:
http://www.google.com/support/webmasters/bin/answer.py?answer=44231&hl=en
It is of course a bad idea to write code that depends on register_globals for security reason, but sometimes when faced with old code it's a necessary evil. You can turn on register_globals for a site or directory by adding the following line to your .htaccess file:
php_flag register_globals on
Assume that you have a folder that is restricted by HTTP Basic Auth but you want to allow access to a sub-folder. Here's how:
<Directory /var/www/vhosts/domain.com/httpdocs/myfolder > Satisfy Any Allow from all </Directory>