预览模式: 普通 | 列表
10-03
12

IIS Redirects - 301 , 302

Microsoft's Internet Information Server ( MS IIS ) is very different from Apache, and you need to handle redirects on it differently.

Although you can use the popular FrontPage web development software with Apache + FP extensions, most people who use FrontPage prefer to use IIS. Also, Microsoft's .NET and ASP development platforms usually work best on MS IIS (no surprise there).

Definitions for Terms used in this Article

Detailed Information
Overview
What you are trying to accomplish here is to have one resource (either a page or an entire site) redirect a visitor to a completely different page or site, and while doing so tell the visitor's browser that the redirect is either permanent (301) or temporary (302).

Therefore you need to do three things:

Have 2 resources - one source page or website, and one destination page or website.
When an attempt to access the source resource is made, IIS transfers the visitor to the destination instead.
During the transfer, IIS reports to the visitor that a redirect is happening and it's either temporary or permanent.
The good news is that IIS has always supported this, and you can use it's control panel to make the redirect.

Administrator Mode - Redirecting a Domain
If you can log into the Windows 2000 (or higher) server and access the desktop, then choose:

Start > Programs > Administrative Tools > Internet Services Manager

查看更多...

Tags: IIS 301 重定向 302

分类:Seo&Hacker | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 448
10-03
12

301和302重定向 各类语言代码大全

最近好像陷进重定向的问题里爬不出来了,先说说301和302重定向好了,301是永久转移,就是说原来的页面改名字了,永远用这个地址代替了。302就是“找到”(Found)也就是临时重定向。


先说说html的302重定向,不是为了page rank,不是为了任何特别的问题,仅仅因为我把一些人家的

查看更多...

Tags: 301 重定向 302

分类:学习 | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 349
10-03
12

Java过滤标点符号

package com.yy.test;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class StringUtil {

public   static   void   testReg(){  
         //先去掉标点,再合并空格  

查看更多...

Tags: 标点 符号 过滤 正则

分类:Java&Jsp | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 1247
10-03
11

Java常用正则表达式(2)

java常用正则表达式
只能输入数字:"^[0-9]*$"。
只能输入n位的数字:"^\d{n}$"。
只能输入至少n位的数字:"^\d{n,}$"。
只能输入m~n位的数字:。"^\d{m,n}$"
只能输入零和非零开头的数字:"^0|[1-9][0-9]*$"。
只能输入有两位小数的正实数:"^[0-9]+(\.[0-9]{2})?$"。
只能输入有1~3位小数的正实数:"^[0-9]+(\.[0-9]{1,3})?$"。
只能输入非零的正整数:"^\+?[1-9][0-9]*$"。

查看更多...

Tags: 正则表达式

分类:Java&Jsp | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 351
10-03
11

java常用正则表达式

import  java.util.regex.Matcher;  
import  java.util.regex.Pattern;  
  
/**  
* @author        Der      
* @date          2006-10-23  
* @packeage_name regex  
*    
*/    

查看更多...

分类:Java&Jsp | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 398
10-03
11

Apache虚拟主机配置301部分问题

利用Apache 301转向把不带前缀的域名转向到www.域名。

<VirtualHost *:80>
ServerName domain.com
RewriteEngine on
RewriteRule ^(.*)$ http://www.domain.com$1 [R=301,L]
</VirtualHost>


如果没有mod_rewrite也可以设置mod_alias:

查看更多...

Tags: Apache 301

分类:Seo&Hacker | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 399