asp,asp.net,php,jspϵÄ301תÏò´úÂë,ÕûÕ¾Öض¨Ïò
asp,asp.net,php,jspϵÄ301תÏò´úÂë
ʹÓÃ.htaccessÎļþÀ´½øÐÐ301Öض¨Ïò¡£
Èç¹û¿Õ¼ä²»Ö§³Ö.htaccessÎļþ£¬ÄÇôÎÒÃÇ»¹¿ÉÒÔͨ¹ýphp/asp´úÂëÀ´½øÐÐ301Öض¨Ïò¡£
ΪÁ˽«ËÑË÷ÒýÇæµÄ¼Ç¼¸üе½ÏÖÔÚµÄÓòÃûÉÏÃæ,×öÁ˼¸¸ö301Öض¨ÏòµÄ¶«¶«,¸ø´ó¼Ò·ÖÏíÒ»ÏÂ.
asp 301תÏò´úÂë
ÔÚ index.asp »ò default.asp µÄ×²¿¼ÓÈëÒÔϼ¸ÐУº
<%
Response.Status="301 Moved Permanently"
Response.AddHeader "Location","http://blog.csdn.net/huwei2003"
Response.End
%>
php 301תÏò´úÂë
ÔÚ index.php µÄ×²¿¼ÓÈëÒÔϼ¸ÐУº
<?php
header("HTTP/1.1 301 Moved Permanently");
header("Location: http://blog.csdn.net/huwei2003");
exit();
?>
asp.net 301תÏò´úÂë
<%@ Page Language="C#" %>
<script runat="server">
protected void Page_Load(object sender, EventArgs e)
{
HttpContext.Current.Response.StatusCode = 301;
HttpContext.Current.Response.Status = "301 Moved Permanently";
HttpContext.Current.Response.AddHeader("Location", "http://blog.csdn.net/huwei2003");
}
</script>
301´ú±íÓÀ¾ÃÐÔתÒÆ(Permanently Moved)£¬301Öض¨ÏòÊÇÍøÒ³¸ü¸ÄµØÖ·ºó¶ÔËÑË÷ÒýÇæÓѺõÄ×îºÃ·½·¨£¬Ö»
Òª²»ÊÇÔÝʱ°áÒƵÄÇé¿ö,¶¼½¨ÒéʹÓÃ301À´×öתַ¡£
JSPϵÄ301Öض¨Ïò
<%@ page language="java" pageEncoding="GBK"%>
<%
response.setStatus(response.SC_MOVED_PERMANENTLY);
response.addHeader("Location",http://blog.csdn.net/huwei2003);
%>
¿ÉÒÔͨ¹ýfilter¿ØÖÆÐèÒªÖØÏòµÄ·¾¶»òÒ³Ãæ
------------------
iisÉèÖÃÕûÕ¾Öض¨Ïò
ÔÚiis Õ¾µãÊôÐÔÀïÕÒµ½ Ö÷Ŀ¼Ïî ÓиöÖض¨ÏòµØÖ·ÉèÖã¬É趨ÄãÒªÖض¨Ïòµ½µÄµØÖ·¼´¿É
±¾ÎÄÀ´×ÔCSDN²©¿Í£¬×ªÔØÇë±êÃ÷³ö´¦£ºhttp://blog.csdn.net/huwei2003/archive/2008/12/13/3510403.aspx
Ïà¹ØÎĵµ£º
Ò³Ãæʼþ˳ÐòÊǹ̶¨µÄ£¬µ«Ò³ÃæÉϵĿؼþʼþÔòÒÀÀµ¾ßÌåÒ³ÃæºÍÓû§µÄ²Ù×÷¡£Èç¹û¿Ø¼þµÄAutoPostBackÊôÐÔÉèÖÃΪtrue£¨Ä¬ÈÏֵΪfalse£©£¬ÄÇô½«Á¢¿ÌÒýÆðÒ³Ãæ»Ø·¢£¬¼´Ò³ÃæÖи÷¸ö¿Ø¼þµÄÖµ»Ø´«µ½Web·þÎñÆ÷ÉÏ£¬Òý·¢ÏàӦʼþ£¬ÓÉʼþµÄ´¦Àí³ÌÐò´¦Àí¡£´¦ÀíÍê³ÉºóÈç¹ûûÓÐÌøתָÁ¸ÃÒ³Ãæ ......
˵Ã÷: Ö´Ðе±Ç° Web ÇëÇóÆڼ䣬³öÏÖδ´¦ÀíµÄÒì³£¡£Çë¼ì²é¶ÑÕ»¸ú×ÙÐÅÏ¢£¬ÒÔÁ˽âÓйظôíÎóÒÔ¼°´úÂëÖе¼Ö´íÎóµÄ³ö´¦µÄÏêϸÐÅÏ¢¡£
Òì³£ÏêϸÐÅÏ¢: System.ArgumentException: ²»Ö§³Ö URI ¸ñʽ¡£
Ô´´íÎó:
ÐÐ 30: protected void BTNCLick(object sender, EventArgs e)
ÐÐ 31: {
ÐÐ 32: System.IO. ......
¿ÉÒÔʹÓà ISAPI ɸѡÆ÷ÔÚ IIS Web ·þÎñÆ÷¼¶±ðʵÏÖ URL ÖØд£¬Ò²¿ÉÒÔʹÓà HTTP Ä£¿é»ò HTTP ´¦Àí³ÌÐòÔÚ
ASP.NET ¼¶±ðʵÏÖ URL ÖØд¡£±¾ÎÄÖصã½éÉÜÈçºÎʹÓà ASP.NET ʵÏÖ URL ÖØд£¬Òò´ËÎÒÃǽ«²»¶ÔʹÓà ISAPI ɸѡÆ÷ʵÏÖ
URL ÖØдµÄϸ½Ú½øÐÐÉîÈë̽ÌÖ¡£µ«ÊÇ£¬ÓдóÁ¿µÄµÚÈý·½ ISAPI ɸѡÆ÷¿ÉÓÃÓÚ URL ÖØд£¬ÀýÈ磺 ......
1.//µ¯³ö¶Ô»°¿ò.µã»÷תÏòÖ¸¶¨Ò³Ãæ
Response.Write(" <script>window.alrt('¸Ã»áԱûÓÐÌá½»ÉêÇë,ÇëÖØÐÂÌá½»£¡') </script>"); Response.Write(" <script>window.loation='http://www.cnblogs.com/kevin1031" target="_blank">http://www.cnblogs.com/kevin1031' </script>");
2.//µ¯³ö¶Ô»°¿ ......
ÆÕͨPHP³ÌÐòÔ±±ÊÊÔÌâ
1. ÓÃPHP´òÓ¡³öÇ°Ò»ÌìµÄʱ¼ä£¬´òÓ¡¸ñʽÊÇ2007Äê5ÔÂ10ÈÕ 22:21:21
2. PHP´úÂëÈçÏ£º
$a="hello";
$b=&$a;
unset($b);
$b="world";
echo $a;
Æä½á¹ûÊÇ£¿
3. PHP´úÂëÈçÏ£º
$str="cd";
$$str="landog";
$$st ......