³ë¹«Çö ´ëÅë·É ¹è³Ê
  ±è¼ºÅÂÀÇ Tech Tips(Linux, PHP, Apache, DBMS, Mobile)
  http://www.supersky.pe.kr  
¾È³çÇϽʴϱî? ±è¼ºÅÂÀÔ´Ï´Ù.
Linux, Apache, PHP, Mysql, Mobile °ü·Ã Tech Tips Á¤º¸¸¦ Á¦°øÇÕ´Ï´Ù.
 
<<   2024 Dec   >>
S M T W T F S
1234567
891011121314
15161718192021
22232425262728
2930311234
1880431 2346
  
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 [email protected]
  
   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 ...  48  49  50  51  52  53  54  55  56 ...  162     next >>