ISAPI Rewrite



Learn MPS Technology on mps-technology.net. ISAPI Rewrite article will help answer your questions on MPS Technology.We at mps-technology.net specialize in MPS Technology. MPS Technology at mps-technology.net provides the most up to date news and articles. If you have questions please do not hesitate to contact us.

Summary:
It controls which domain names are handled by which sub-folder by utilizing different regular expression rules.

Some tips to remember when creating the rules.

# is used to comment out a line

The following characters must be preceded by a '' to be recognized as a literal character ( meaning a character that represents itself)

'.', '*', '?', '+', '(', ')', '{', '}', '[', ']', '^' and '$'.
This becomes important when typing (www.domain.com) it would have to look like (www.domain.com)

Parentheses are used to group items together to be marked as what is to be matched, such as '(apple)*' would match all of the string 'appleappleapple'.

You can see more helpful expression tips here, http://www.isapirewrite.com/docs/examples

Some examples of the rules you will see in the httpd.ini file look like this:

#manual redirect of one domain
RewriteCond Host: (www.)?domain1.com
RewriteRule (.*) /domain1$2

#redirecting to another URL
RewriteCond Host: (www.)?domain1.com
RewriteRule (.+) http://www.domain2.com$1 [R]

#Rewrite just one domain but keep the old link working
RewriteCond Host: (www.)?domain1.com
RewriteRule (?!/domain1)(.*) /domain1$2 [I]

Many tricks come with a catch, and this is no exception.
Article:
Have you ever wanted to manage multiple domain names under a single story in IIS (Internet Information Services)? A non-competitive way to do this is to handle it from code. There are some disadvantages when handling this directly from code. Static pages aren't redirected, non-developers will need to purchase or dust off their programming books, and evidence remains that a redirection was done.

Along came ISAPI Rewrite www.isapirewrite.com to solve this issue. Running at the ISAPI level in IIS, this is done in preparation for any page or code is accessed so it works equally well on static and dynamic content. It overcomes all the objections mentioned above.

With well-kenned redirection code, the user would see something like this:
http://www.domain1.com
http://www.domain2.com/domain2
http://www.domain3.com/domain3

With the ISAPI Rewrite component, the user will see this:
http://www.domain1.com
http://www.domain2.com
http://www.domain3.com

Even though in the background the scenes the sites can be in completely different sub-folders, the person visiting the website won't have any concept of this. They will simply see the clarify domain names.

ISAPI Rewrite will rewrite (kind of like a redirect) the user to a sub-folder even though the web browser doesn't realize this.

This is done very fast and efficiently and managed by a file titled httpd.ini which should be placed in the root of the site. It controls which domain names are handled by which sub-folder by utilizing different regular expression rules.

Some tips to remember when creating the rules.

# is used to commentate out a line

The following troupe must be preceded by a '' to be recognized as a literal character woman ( meaning a queer fish that represents itself)

'.', '*', '?', '+', '(', ')', '{', '}', '[', ']', '^' and '$'.
This becomes important when typing (www.domain.com) it would have to look like (www.domain.com)

Parentheses are used to group items together to be marked as what is to be matched, such as '(apple)*' would match all of the string 'appleappleapple'.

You can see more helpful expression tips here, http://www.isapirewrite.com/docs/examples

Some examples of the rules you will see in the httpd.ini file look like this:

#manual redirect of one domain
RewriteCond Host: (www.)?domain1.com
RewriteRule (.*) /domain1$2

#redirecting to ulterior URL
RewriteCond Host: (www.)?domain1.com
RewriteRule (.+) http://www.domain2.com$1 [R]

#Rewrite just one domain but keep the old link working
RewriteCond Host: (www.)?domain1.com
RewriteRule (?!/domain1)(.*) /domain1$2 [I]

Many tricks come with a catch, and this is no exception. One disadvantage that I have come versus is that the response.write from ASP or ASP.NET does not work well in conjunction with this component. correct paths are required since relative paths are done aft ISAPI Rewrite handles the request and aren't redirected as would be expected. The workaround is to use unmitigated paths with the full domain name in the redirect. If Server.Transfer is to be used, it should be tested as well. It runs into similar issues.

Additionally, when using ASP or ASP.NET, the new virtual root folder should be marked as an request so that the new virtual root's folder is used for global.asa(x), web.config and /bin.



ContentMaestro. - ContentMaestro helps you rewrite content/articles, producing many human readable versions quickly and easily.
Content Rewriter Pro. - Rewrite Contents Automatically! Get Unique Contents Quickly and Easily!


Article Index: | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29


Advice
Home Business
Technology
Online Advertising
Motivational
Internet Marketing
SEO Help
Online Games
Science Articles
Happiness

More Articles:


1. Honey, I Shrunk the Chip!
Summary:Let's get small, real small, and then we can go anywhere!No, I'm not advocating we shrink ourselves, but ratherdiscussing dramatic changes coming now that computers canbe tiny and inexpensive. Hang on and let's go for a tiny ride.Imagine a tube so small that it's 100,000 times smallerround than a human hair, so small that atoms must passthrough them in single file! each have additional microprocessors.If you are lucky enough to drive a new Mercedes, you have65 microprocessors parked righ…

2. Digital Kanban from Datacraft Solutions' Signum Creates Intelligent Supply Chain
Summary: PS/EKD has forecasted a minimum of 20% increase in inventory turns by year-end, and we've seen a reduction in the transactional processes that were necessary in the FAX Release system Signum replaced.' A Materials Manager from a Tier 1 automotive supplier noted the impact of Digital Kanban technology from Durham, NC based Datacraft Solutions: 'We scan over 5000 cards a day, have just added 1500 parts from out tool crib, and have had zero part shortages since going live 3 months ago. Art…

3. Carbon Sequestration- Is it a new lease of life for coal fired electrical power plants?
Summary: Affordable and environmentally safe sequestration approaches could offer a way to stabilise atmospheric levels of CO2 without requiring the countries to make large-scale and potentially costly changes to their energy infrastructures.Terrestrial Carbon SequestrationTerrestrial carbon sequestration is defined as: 'either the net removal of CO2 from the atmosphere or the prevention of CO2 net emissions from the terrestrial ecosystems into the atmosphere'. There are two fundamental approach…

4. How to Place Home Theater Speakers
Summary: So for a 5.1 surround sound system, there are five speakers (the center channel, the two front speakers, and the two rear speakers) and one subwoofer. When placing your home theater speakers, try to use the same amount of speaker wire for each type of speaker. Make sure the speaker is pointed directly at the audience.Front Speakers The two front speakers should be the same distance from the audience as the center channel. Try to have the rear speakers the same distance from the TV in or…