In some polls and the like, we tend to ask everyone to vote only for the principle of fairness, in some web development there are similar situations, we usually use cookies, such as the following code:if (Cookies.lenght = = 0 | | | cookies = NULL)
Asp.net rewrite urlrewriter with URL to implement any second-level domain name
Asp.net uses URL rewriting (urlrewriter) to implement any second-level domain name
I haven't written any technical articles for a long time. If you can't understand them,
Use URL rewritingIn some cases, browsers may not accept cookies, so they cannot use cookies for session tracking. URL rewriting is a solution in this case. When the Weblogic server detects that the browser does not accept cookies, it will
Talking about the need to set up IIS, mainly to implement the virtual host or not to get the IIS operating restrictions, can not add ISAP and want to implement similar to the static implementation of the program, first of all, to declare that the
The code is as follows
Copy Code
Using System;Using System.Collections.Generic;Using System.Web;Using System.IO;Using System.Text;Namespace MyClass{public class Myhttpmodule:ihttpmodule{#region IHttpModule MembersFree All
ActionlessForm.dll------used to process postbacks
URLRewriter.dll-----is a URL rewrite component that Microsoft has packaged
Add a reference----
Specific instructions please go and
Some days ago using Linux to do a server to write something, found under Apache. htaccess is a good thing! Not only can the URL true rewrite, but also can implement false rewrite. True rewrite can effectively reduce the amount of code and server
Development Guide
The fleaphp application determines the controller and action to be executed by parsing the URL address, and the parameters passed to the action method.
By default, the fleaphp application
As mentioned above, the pseudo-static asp url is also very easy to use. net. Let's share some good things!
You can add QQ 282116460 if you don't understand it.
The details are as follows:
Install and configure ISAPI rewrite under IIS to implement
Add reference urlrewriter. DLL to the bin directory of the project, and download the package/files/jaylong/msdnurlrewriting.zip from Microsoft.
1. Configure nodes under of the node in the web. config file
2. write rewrite rules in the node
Brief Review:Modifying Microsoft's urlrewrite can rewrite the URL, where the domain name needs to be rewritten to implement http://1234.abc.com/to http://www.abc.com/show.aspx? Id = 1234.Step: 1. Your domain name http://www.abc.com/is pan-resolved,
Download rewrite. dll, find the ISAPI filter in the website properties, and add it.
Configure the httpd. ini file
[Isapi_rewrite]
#3600 = 1 hour# Cacheclockrate 3600
# Repeatlimit 32
# This work by the server sharing forum to provide
For tags
That is, if the URL contains a tag, you want to change it to wholesale or another method,
1
Refer to the blog plug-in method:
Add an event to ETC/config. xml:
Singleton blog/Observer addblogsection
Then, use the following
Brief Review:
Modification of Microsoft's urlrewrite can rewrite the URL. Here, the domain name must be rewritten to implement
Http://1234.abc.com/To
Http://www.abc.com/show.aspx? Id = 1234.
Step: 1. Your Domain Name
Http://www.abc.com/Is pan-parsed,
Except (but does not comply with the rewrite rules) does not know how to deal with, resulting in this request does not
For any processing.The following error occurs:"/" Indicates a server error in the application.------------------------------------
Make a news system, and rewrite each news URL.
1. Web. config Configuration
~ /(\ D +) \. aspx ~ /Detail. aspx? Id = $1
2. Create a page file
. aspx 'target = "_ blank" Title = ''> ·
Create bulletindetails. aspx
In the
Opening and setting the rewrite module of Apache is not the topic of this Article. For more information, see
Article Details.
This class can only be used in PHP 5.30 or later versions, and inherits the features of fast redirection in the
First, your domain name must support wildcard resolution.
Second: Make sure your override DLL modified version,: http://files.cnblogs.com/aiouluosi/UrlRewriter.rar
Step 1:
Part 2:
http: // (\ D *) .sz1234567.cn
~ /Home/starhome. aspx? Uid = 2
First of all, download urlrewriter, download and install ghost, and find the urlrewriter. dll file in the bin directory.
Then, reference the file to the project and configure the file as follows:
1. Add the following code to the Web. config file:
URL rewrite and Google spider
We know that we need to take some measures to search engines for websites. At least we need to rewrite the URL. But the problem is.We found that Google Yahoo spider could not catch the webpage Baidu.
All are 500 errors
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.