Results 1 to 7 of 7

Thread: Missing REMOTE_ADDR variable in URL Rewrite 2.0

  1. #1
    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.

  2. #2
    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.

  3. #3
    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.

  4. #4
    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

  5. #5
    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.

  6. #6
    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.

  7. #7
    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.

Similar Threads

  1. Need help with url rewrite on my website
    By Dakshayani in forum Software Development
    Replies: 5
    Last Post: 29-06-2011, 03:25 AM
  2. How to do URL rewrite using ScriptManager?
    By AlpAnA$ in forum Software Development
    Replies: 3
    Last Post: 28-06-2011, 01:54 PM
  3. Classic ASP’s URL Rewrite
    By Camdra in forum Software Development
    Replies: 4
    Last Post: 18-06-2011, 10:11 PM
  4. Replies: 2
    Last Post: 28-08-2009, 07:51 PM
  5. Replies: 3
    Last Post: 25-04-2009, 11:34 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,711,620,504.44252 seconds with 17 queries