rf=Request.Serv erVariables("HT TP_REFERER")
sv2=Request.Ser verVariables("U RL") & "?" & Request.ServerV ariables("QUERY _STRING")
if instr(rf,"http://www.westcoast") = 1 then
'response.redir ect "http://midvalleyfurnit ure.com" & sv2
end if
If I put the redirect back in, it hangs and times out. Otherwise, works fine.
What am I doing wrong?
Thanks,
Brett 4 1707
Can't reproduce; need more information.
Have you tried using the same code in a different page? On a different
server? From different referrers? Using a different redirect URL?
Have you tried response.write instead of response.redire ct, and paste the
displayed URL in the browser directly?
Have you tried using server.transfer , or sending the URL to client-side
script to perform the redirect? Have you considered using the client-side
window.history. go(-1); method (not sure of the exact syntax, I think that's
close)?
You need to help us narrow down which variables are factors and which are
not...
--
Aaron Bertrand
SQL Server MVP http://www.aspfaq.com/
"Brett" <cl************ ***@yahoo.com> wrote in message
news:99******** *************** ***@posting.goo gle.com... rf=Request.Serv erVariables("HT TP_REFERER")
sv2=Request.Ser verVariables("U RL") & "?" & Request.ServerV ariables("QUERY _STRING")
if instr(rf,"http://www.westcoast") = 1 then 'response.redir ect "http://midvalleyfurnit ure.com" & sv2 end if
If I put the redirect back in, it hangs and times out. Otherwise, works fine.
What am I doing wrong?
Thanks, Brett
Brett wrote on 21 mei 2004 in microsoft.publi c.inetserver.as p.general: rf=Request.Serv erVariables("HT TP_REFERER")
sv2=Request.Ser verVariables("U RL") & "?" & Request.ServerV ariables("QUERY _STRING")
if instr(rf,"http://www.westcoast") = 1 then 'response.redir ect "http://midvalleyfurnit ure.com" & sv2 end if
If I put the redirect back in, it hangs and times out. Otherwise, works fine.
Try this for debugging, and you will probably see that the redirect is to
an illegal string:
rf=Request.Serv erVariables("HT TP_REFERER")
sv2=Request.Ser verVariables("U RL") & "?" &_
Request.ServerV ariables("QUERY _STRING")
if instr(rf,"http://www.westcoast") = 1 then
'response.redir ect "http://midvalleyfurnit ure.com" & sv2
''''''''''''''' '
response.write "http://midvalleyfurnit ure.com" & sv2
response.end
''''''''''''''
end if
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
The redirect works fine, if only going to midvalleyfurnit ure.com. It
hangs when I add the url/query string. I've tried response.writin g it
to a link and the url works perfectly, just fails on redirect.
What is server.transfer ?
Thanks,
Brett
"Aaron Bertrand [MVP]" <aa***@TRASHasp faq.com> wrote in message news:<ew******* *******@tk2msft ngp13.phx.gbl>. .. Can't reproduce; need more information.
Have you tried using the same code in a different page? On a different server? From different referrers? Using a different redirect URL?
Have you tried response.write instead of response.redire ct, and paste the displayed URL in the browser directly?
Have you tried using server.transfer , or sending the URL to client-side script to perform the redirect? Have you considered using the client-side window.history. go(-1); method (not sure of the exact syntax, I think that's close)?
You need to help us narrow down which variables are factors and which are not...
-- Aaron Bertrand SQL Server MVP http://www.aspfaq.com/
"Brett" <cl************ ***@yahoo.com> wrote in message news:99******** *************** ***@posting.goo gle.com... rf=Request.Serv erVariables("HT TP_REFERER")
sv2=Request.Ser verVariables("U RL") & "?" & Request.ServerV ariables("QUERY _STRING")
if instr(rf,"http://www.westcoast") = 1 then 'response.redir ect "http://midvalleyfurnit ure.com" & sv2 end if
If I put the redirect back in, it hangs and times out. Otherwise, works fine.
What am I doing wrong?
Thanks, Brett
Solved it. It was redirecting to pages with the same code to grab the
referrer. Since it was a redirect, there was no referrer, and it hung,
so I just passed another var to make sure the referrer code didn't run
a second time.
Brett
"Aaron Bertrand [MVP]" <aa***@TRASHasp faq.com> wrote in message news:<ew******* *******@tk2msft ngp13.phx.gbl>. .. Can't reproduce; need more information.
Have you tried using the same code in a different page? On a different server? From different referrers? Using a different redirect URL?
Have you tried response.write instead of response.redire ct, and paste the displayed URL in the browser directly?
Have you tried using server.transfer , or sending the URL to client-side script to perform the redirect? Have you considered using the client-side window.history. go(-1); method (not sure of the exact syntax, I think that's close)?
You need to help us narrow down which variables are factors and which are not...
-- Aaron Bertrand SQL Server MVP http://www.aspfaq.com/
"Brett" <cl************ ***@yahoo.com> wrote in message news:99******** *************** ***@posting.goo gle.com... rf=Request.Serv erVariables("HT TP_REFERER")
sv2=Request.Ser verVariables("U RL") & "?" & Request.ServerV ariables("QUERY _STRING")
if instr(rf,"http://www.westcoast") = 1 then 'response.redir ect "http://midvalleyfurnit ure.com" & sv2 end if
If I put the redirect back in, it hangs and times out. Otherwise, works fine.
What am I doing wrong?
Thanks, Brett This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: John A. Irwin |
last post by:
I'm very new to PHP and am trying to figure out how to parse out a
variable "HTTP_REFERER". My reason for this is my site was recently
"FEATURED" (sic) on a website called FARK.COM. Because of this I
received over 100,000 Hits in less then one hour and it caused my host's
server farm to crash. While I understand that I could move to a more
robust Web Host, I would rather trap any further links from FARK and
redirect them to a rejection...
|
by: Jez |
last post by:
Any ideas why I'm not able to use $_SERVER on my
shared hosting account (PHP 4.1.2), but I can on my local server (PHP
4.3.3)?
I imagine it has something to do with the different versions of PHP or
perhaps php.ini, but I'm not sure what?
Thanks!
Jez
|
by: deko |
last post by:
I have a page that I don't want anyone to be able to link directly to. The
page should only be accessed from gatepage.php. I tried this code, but keep
getting errors - "header info already sent", or something like that... Am I
missing something, or is there a better way to do this?
<?php
$ref = $_SERVER;
//echo $ref;
if ( $ref == 'http://www.mydomain.com/gatepage.php' )
{
|
by: ssk |
last post by:
Hello!
I made a web site using PHP Open sources for message board.
Everything's fine except one computer can't open a message writing
page.
The code that gives an error is the following.
if(!eregi($HTTP_HOST,$HTTP_REFERER)) Error("Write in the normal way");
|
by: M Smith |
last post by:
On our web site we allow our members access to features hosted by another
web site. The way the other web site authenticates users is to check the
value of the HTTP_REFERER. If it comes from our Login.asp page it lets them
in. When our users login to go to the other site, they login on our site's
Login.asp page. When they click submit, our LoginCheck.asp page validates
them and does a response.redirect to the other site. In most cases...
| |
by: Ringo Langly |
last post by:
Hi everyone,
We're using an outside vendor to provide some content for our website,
and they use the http_referer variable to verify their content is only
viewed from subscribing customers.
Anyway, we're using the mm_menu javascript menu for our web menus, and
under only Internet Explorer it's not passing the http_referer -- which
means any site of theirs we link to from the menu doesn't work. This
works fine in Firefox, Mozilla, and...
|
by: Prabhat |
last post by:
Hello,
I have the below requirement.
When ever my website is opened by any link: say clicked from the google
search result or a link from other website:
Then I should able to know the referrer URL. How Do I get that?
I know about Request.ServerVariables("HTTP_REFERER"). So I used this in
|
by: tshad |
last post by:
Why would HTTP_REFERER not be there in the Page_Load event?
I am using it to determine whether a page was called from a particular page.
I am doing:
sTest = Request.ServerVariables("HTTP_REFERER")
if (sTest = "") ORELSE (sTest.SubString(sTest.LastIndexOf("/")+1) <>
"job_posting_new2.aspx") then
newPosition = new Position
|
by: Lorna |
last post by:
I can't seem to get the ENV variable HTTP_REFERER when posting with CGI from one program to another. In my post program I have put in the <HEAD> HTTP_REFERER =my host - ie www.xyz.com (I have also tried removing it entirely in case that was causing problems.
I have tried to extract the HTTP_REFERER in my receiving program with
$http_ref = $ENV{'HTTP_REFERER'};
That didn't work so I just printed all variables with
foreach $key...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |