¾ÆÆÄÄ¡ ¸ðµâÀ» ÀÌ¿ëÇÑ À¥¿¡¼ ÆÄÀÏ Á¢±Ù Á¦ÇÑ |
|
|
 |
15³â Àü |
À¥À» ÅëÇؼ ƯÁ¤ ÆäÀÌÁö³ª ƯÁ¤ µð·ºÅ丮¸¦ »ç¿ëÀÚ°¡ ¿¢¼¼½º ÇÒ °æ¿ì ¿¢¼¼½º ÇÒ ÆÄÀÏÀ» ºÒ·¯µéÀ̱â Àü¿¡ ¹Ì¸® ÁöÁ¤ÇÑ cgiÈÀÏÀ» ¸ÕÀú È£ÃâÇÏ°Ô²û ÇÏ´Â°Ô auth_actions¸ðµâÀÌ´Ù.
±×°É ÀÀ¿ëÇؼ »ç¿ëÀÚ°¡ Á÷Á¢ urlÀ» Ãļ ÀÎÁõ¾øÀÌ µé¾î¿À´Â °æ¿ì¸¦ ¸·´Â ¹æ¹ýÀÌ´Ù.
(´Ù¸¥ ¹æ¹ýÀ¸·Îµµ ÀÀ¿ëÀÌ °¡´ÉÇÏ´Ù. ex)ÆäÀÌÁö Ä«¿îÅÍ, Åë°è etc)
.htaccessÈÀÏ¿¡¼ ÈÀÏÀ» ¿¢¼¼½º ÇÏ·Á¸é authTest.php¶ó´Â ÈÀÏÀ» °ÅÃÄ¾ß µÇ°Ô Çß°í authTest.php¿¡¼´Â ¼¼¼ÇÀÌ ÀÖ´ÂÁö °Ë»ç ÇÑ´Ù. À̶§ ¼¼¼ÇÀÌ ÀÖÀ¸¸é ÆäÀÌÁö¸¦ º¸¿©ÁØ´Ù.
/test/
- authTest.php
- seoul.gif
- .htaccess
*************** .htaccess *********************
AddHandler my-file-type .gif
Action my-file-type /test/authTest.php
*************** authTest.php ******************
<?
session_start();
if(!session_is_registered(sess_userid))
{
echo "¼¼¼ÇÀÌ ¾øÀ¸¸é À̹ÌÁö¸¦ º¼¼ö ¾ø¾î¿°. ¸®ÇÁ·¹½¬ ~~";
$session_userid = "u2love";
session_register(sess_userid);
}
exit;
header("Expires:Mon, 26, Jul 1997 05:00:00 GMT"); //date in the past
header("Last-Modified: " . gmdate("D, d M Y H:i:s"), "GMT"); //always modified
header("Cache-Control: no-store, no-cache, must-revalidate"); //HTTP/1.1
header("Cache-Control: post-check=0, pre-check=0", false);
header("Content-Type: gif");
header("Pragma: no-cache");
header("Content-Disposition: inline; filename=../$_SERVER[REQUEST_URI]");
readfile("../" . $_SERVER[REQUEST_URI]);
?>
Âü°í]
http://httpd.apache.org/docs-2.0/mod/mod_actions.html
|
|
̵̧ : 253 |
̵̧
¸ñ·Ï
|
|