³ë¹«Çö ´ëÅë·É ¹è³Ê
  ±è¼ºÅÂÀÇ Tech Tips(Linux, PHP, Apache, DBMS, Mobile)
  http://www.supersky.pe.kr  
¾È³çÇϽʴϱî? ±è¼ºÅÂÀÔ´Ï´Ù.
Linux, Apache, PHP, Mysql, Mobile °ü·Ã Tech Tips Á¤º¸¸¦ Á¦°øÇÕ´Ï´Ù.
 
<<   2024 Nov   >>
S M T W T F S
272829303112
3456789
10111213141516
17181920212223
24252627282930
1858820 1208
  
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 ...  49  50  51  52  53  54  55  56  57 ...  163     next >>