Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Register Tags Active Topics RSS Search Mark Forums Read

Sponsored Links



Missing REMOTE_ADDR variable in URL Rewrite 2.0

Software Development


Reply
 
Thread Tools Search this Thread
  #1  
Old 20-06-2011
Member
 
Join Date: Mar 2011
Posts: 280
Missing REMOTE_ADDR variable in URL Rewrite 2.0
  

I'm demanding to discover a resolution to permit the client IP to be conserved utilizing an X-Forwarded-For header from hardware load balancer. I want to obtain this functioning through URL Rewrite 2.0 as this will be the most acceptable alternative on one occasion v2.0 is released, except I'm getting problem receiving the REMOTE_ADDR variable to be over-written.
I can effectively mark the X-Forwarded-For value to a latest HTTP_variable:
Code:
<set name="HTTP_Test" value="{HTTP_X_Forwarded_For}" replace="true" />
However while I attempt to set the REMOTE_ADDR variable, not anything occurs:
Code:
<set name="REMOTE_ADDR" value="{HTTP_X_Forwarded_For}" replace="true" />
Is there anything missing here.

Reply With Quote
  #2  
Old 20-06-2011
Member
 
Join Date: Feb 2010
Posts: 471
Re: Missing REMOTE_ADDR variable in URL Rewrite 2.0

I can substantiate that I am noticing the identical actions, while a page is accessed utilizing its complete name (contoso.com/default.asp) the URLRewrite effectively restores the server variables, while the page is set like a default document plus accessed utilizing the directory name URLRewrite does not accomplish the server variable substitution. Do you have whichever additional rewrite rules prior to otherwise following this one? Perhaps they obstruct while blank URL path is utilized? Furthermore attempt allowing Failed Request Tracing.
Reply With Quote
  #3  
Old 20-06-2011
Member
 
Join Date: Feb 2010
Posts: 570
Re: Missing REMOTE_ADDR variable in URL Rewrite 2.0

This is the problem caused through utilizing URL Rewrite 2.0 mutually through IIS default document. IIS Default Document component creates a child demand in IIS except it does not protect the demand context while doing this. Therefore if URL rewrite has position a server variable and afterward defaulting document component runs the server variable modify gets missing. This is a trouble through the default document section and IIS is looking into methods for solving it.
Reply With Quote
  #4  
Old 20-06-2011
Member
 
Join Date: Feb 2010
Posts: 641
Re: Missing REMOTE_ADDR variable in URL Rewrite 2.0

Legacy code (the code which utilizes REMOTE_ADDR) is not load reasonable. I donít encompass sufficient developer resources in order to rewrite the legacy code to make use of our custom header. Setting this ruling worldwide on a server would permit us a rapid method to transfer legacy code toward a server farm at the back load balancers. In spite of not being capable to set this up by the side of the global level, I will almost certainly shift forward by the workaround. I have not set up whatever thing else that will complete this job
Reply With Quote
  #5  
Old 20-06-2011
Member
 
Join Date: Feb 2010
Posts: 533
Re: Missing REMOTE_ADDR variable in URL Rewrite 2.0

Have you thought permitting a selection to select whether to make use of the first otherwise last entry inside the X-Forwarded-For header? We'd adore making use of this helper intended for sites that are CDN allowed, except presently your helper utilizes the previous proxy device on the CDN rather than the inventing client. However still there is lot of confusion in this but none able to figure it out yet.
Reply With Quote
  #6  
Old 20-06-2011
Member
 
Join Date: Feb 2010
Posts: 530
Re: Missing REMOTE_ADDR variable in URL Rewrite 2.0

One or more RewriteCond directives can be placed SUBMIT provided for the types of queries that will be subject to the following RewriteRule. The first argument is a variable that describes a feature of the application, the second argument is a regular expression that must match the variable, and an optional third argument is a list of indicators that are changing the way the condition is evaluated.
Reply With Quote
  #7  
Old 24-06-2011
Member
 
Join Date: Feb 2010
Posts: 658
Re: Missing REMOTE_ADDR variable in URL Rewrite 2.0

URL rewriting is a manipulation created by the user, it should be very careful what you put in htaccess to avoid falling into the excesses that put the server on the ball. Although generally configured properly to avoid falling into such traps. The most common use of the URL Rewrite is rewriting the URL of your site to present to the user a more mnemonic url, facilitating in the wake of its indexing by search engines that will leave about side dynamic pages with many parameters.
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: , , , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "Missing REMOTE_ADDR variable in URL Rewrite 2.0"
Thread Thread Starter Forum Replies Last Post
Need help with url rewrite on my website Dakshayani Software Development 5 29-06-2011 03:25 AM
How to do URL rewrite using ScriptManager? AlpAnA$ Software Development 3 28-06-2011 01:54 PM
Classic ASPís URL Rewrite Camdra Software Development 4 18-06-2011 10:11 PM
Runtime Error 91 : Object Variable or with block variable not set Ryan21 Software Development 2 28-08-2009 07:51 PM
What is Global Variable static? Declaring static variable instead of Global variable Reckon Software Development 3 25-04-2009 11:34 AM


All times are GMT +5.5. The time now is 04:39 AM.