lang/php

가상호스트 mod_rewrite 및 gzip 설정

C/H 2010. 9. 14. 08:30
<VirtualHost *:80>
	ServerAdmin username@email.com
	DocumentRoot /home/user/www
	ServerName localhost

	<directory home/user/www>
		FileETag MTime Size
		AllowOverride All 
		Order deny,allow
		Allow from all

		RewriteEngine On
		php_flag session.auto_start ON

		RewriteCond %{REQUEST_FILENAME} !-f
		RewriteCond %{REQUEST_FILENAME} !-d
		RewriteRule ^(.*)$ /index.php/$1 [L]
	</directory>

	AddOutputFilterByType DEFLATE text/css text/html application/x-javascript application/javascript

	<ifmodule mod_deflate.c>
		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
		BrowserMatch ^Mozilla/4 gzip-only-text/html
		BrowserMatch ^Mozilla/4\.0[678] no-gzip 

		BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
	</ifmodule>
	</VirtualHost>
반응형

'lang > php' 카테고리의 다른 글

xampp 에서 curl 설정  (0) 2010.09.16
lampp mysql 원격접속 문제  (0) 2010.09.15
p3p  (0) 2010.09.13
php type check  (0) 2010.08.27
facebook API & Session 죽이기  (0) 2010.08.26