³ë¹«Çö ´ëÅë·É ¹è³Ê
  ±è¼ºÅÂÀÇ Tech Tips(Linux, PHP, Apache, DBMS, Mobile)
  http://www.supersky.pe.kr  
¾È³çÇϽʴϱî? ±è¼ºÅÂÀÔ´Ï´Ù.
Linux, Apache, PHP, Mysql, Mobile °ü·Ã Tech Tips Á¤º¸¸¦ Á¦°øÇÕ´Ï´Ù.
 
<<   2008 May   >>
S M T W T F S
27282930123
45678910
11121314151617
18192021222324
25262728293031
1858273 661
  
DNS Powered by DNSEver.com
  ++ [Æß] Rewrite ¸ðµâÀ» ÀÌ¿ëÇÑ ¼­ºêµµ¸ÞÀÎ ¹«Á¦ÇÑ »ç¿ëÇϱ⠠-  2008/05/23 11:27

Rewrite ¸ðµâÀ» »ç¿ëÇϱâ À§ÇÑ Apache ÄÄÆÄÀϿɼÇ

Rewrite ¸ðµâÀ» ¾²±âÀ§ÇÑ Apache ÄÄÆÄÀÏ ¿É¼ÇÀº --enable-rewrite ÀÔ´Ï´Ù.
Configure ½ÇÇà½Ã¿¡  --enable-rewrite ¸¸ Ãß°¡ÇϽøé Apache¿¡¼­ rewrite ¸ðµâÀ» »ç¿ëÇÒ ÀÖ°Ô µË´Ï´Ù.

[root@web root]# ./cofigure prefix=/usr/www/apache --enable-rewrite
[root@web root]# make
[root@web root]# make install

 

VirtualHost ¼³Á¤¹ý

<VirtualHost x.x.x.x>
   ServerName test.com

   ServerAlias www.test.com
   ServerAdmin help@test.com
  
   RewriteEngine on
   RewriteCond %{HTTP_HOST} !^www\.test\.com$
   RewriteCond %{HTTP_HOST} !^test\.com$
   RewriteCond %{HTTP_HOST} ^[^.]+.test\.com$
  
   RewriteRule ^(.+) %{HTTP_HOST}$1 [C]
   RewriteRule ^([^.]+)\.test\.com(.*) /home/test/htdocs/sub-domain/$1$2
  
   DocumentRoot /home/test/htdocs
   php_admin_value open_basedir /home/test:/var/tmp:/tmp
</VirtualHost>


http://test.com, http://www.test.com
/home/test/htdocs

 http://sub1.test.com
/home/test/sub-domain/sub1

 http://sub2.test.com 
/home/test/sub-domain/sub2







      << prev     1 ...  3  4  5  6  7  8  9  10  11     next >>