Quantcast
Channel: Installation and Setup
Viewing all articles
Browse latest Browse all 631

Move to new server and Request.ServerVariables("QUERY_STRING") Now Returns Empty/Null Value

$
0
0

I have a custom error handling module for my site and it works fine on its current vps, which is setup with older versions of just about everything.  The site is being moved to a new vps and the code doesn't work on the new server. In tracking it down, the site is correctly routing to the 404.asp file (with ecinclude inc_404.asp) with use of a web.config file. Within the file, it performs a "Request.ServerVariables("QUERY_STRING")" to find out what page was requested and then handles it accordingly.  On the current server, it returns values like "404;http://www.sample.com:80/text_that_was_entered".  On the new server, it returns nothing.  So since it doesn't get a value, it can't parse it and determine what to do.

Here's a portion of the code:

''Perform product/category check on requested page and generate / return if exists
url=Request.ServerVariables("SERVER_NAME")
qstring=Request.ServerVariables("QUERY_STRING")

Note: the "SERVER NAME" request works fine on both.  But the value of "qstring" ends up as null/empty on the new server.

I'm at a loss (and so are two different hosting companies that have attempted to move the sites to new servers) as to 1) what setting needs to be changed or 2) what version of what needs to be installed or 3) what code needs to change, to get the value to return.

I'd greatly appreciate any help. I'm happy to look up any versions/settings that would help you help me.  Thanks!


Viewing all articles
Browse latest Browse all 631

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>