³ë¹«Çö ´ëÅë·É ¹è³Ê
  ±è¼ºÅÂÀÇ Tech Tips(Linux, PHP, Apache, DBMS, Mobile)
  http://www.supersky.pe.kr  
¾È³çÇϽʴϱî? ±è¼ºÅÂÀÔ´Ï´Ù.
Linux, Apache, PHP, Mysql, Mobile °ü·Ã Tech Tips Á¤º¸¸¦ Á¦°øÇÕ´Ï´Ù.
 
<<   2024 Apr   >>
S M T W T F S
31123456
78910111213
14151617181920
21222324252627
2829301234
1763119 639
  
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 ...  24  25  26  27  28  29  30  31  32 ...  78     next >>