redirect script help
- Started
- Last post
- 10 Responses
- stewart
i have two URLs
1. otherURL.com
2. mywebsite.comotherURL.com redirects to mywebsite.com
but at mywebsite.com i want to redirect visitors from otherURL.com to a subfolder like mywebsite.com/mywebsite
i use this script in the index.html file on mywebsite.com
http://www.kulsdom.com/newstoday…
(i got this script from the servicedesk of my hostingprovider)
but that doens't work.
any suggestions to solve this problem??
- stewart0
*
- UndoUndo0
php
if($_SERVER['HTTP_REFERER']=="my...
header("Location: http://www.example.com/")
}make sure there is no whitespace before this php
- stewart0
thanks Undo, that's something in the right direction i guess.
but i'm on a NT server, .asp...
*hides
- UndoUndo0
haha, can't you put a simple redirection script(URL forwarding) on the old domain name? alot of hosts offer this
- IRNlun60
how about a refresh/redirect meta tag?
META HTTP-EQUIV="refresh" content="5;URL=http:\\blah.com"
- thirtytwo0
Dim strURL
In ASPstrURL = Request.ServerVariables(“HTTP_RE...
If strURL = “mydomain” Then
Response.redirect(“newsite”)
End if
- stewart0
haha Undo,
it's not an old domain name, but a domain name for a temporary event website.
i wanted the host to redirect that URL to a folder on our webserver, but it is only possible to redirect to a domain name.
i wrote this script and it works.
thanks all!
http://www.kulsdom.com/newstoday…
- ldww0
http_referer is not a good way to go. this can be inconsistant and in alot of places will come across blank. norton internet security, for example, by default blocks the refferer.
- stewart0
i think it works now, i simply read the addressbar variable and compare it to the value i want it to be.
- UndoUndo0
http_referer is not a good way to go. this can be inconsistant and in alot of places will come across blank. norton internet security, for example, by default blocks the refferer.
ldww
(Feb 13 06, 07:36)
...................................
i dont think there is a completely fool proof way of doing this unless you did it directly from the domain where you want the forwarding to happen