| Home | Register | FAQ | Members List | Search | Today's Posts | Mark Forums Read |
|
|
#1 (permalink) |
|
coffee is not a crime
Join Date: Oct 2005
Location: Illinois, USA
Posts: 446
|
redirect
When people visit my site, I want them redirected to a page. However, I want them to be able to click a link to the original home page to continue to the web site when they are done with that page. I also don't want it timed. Server uses asp/javascript. Any ideas? jt |
|
|
|
|
|
#3 (permalink) |
|
coffee is not a crime
Join Date: Oct 2005
Location: Illinois, USA
Posts: 446
|
ya. but if i renamed the index, all the pages that point to the default page would now go to the redirected page. i just changed priorities in IIS. i guess i just wondered if it was possible with code in case i can't ever get to IIS settings. |
|
|
|
#4 (permalink) |
|
Senior Member
Join Date: Oct 2006
Posts: 2,075
|
Let me try and understand this. For example, lets say you have the following files. index.asp redirect.asp You would like someone who visits "yourdomain.com" to be sent to the "redirect.asp" page, but you also want people to be able to visit "index.asp" by clicking on a link on your page. If you didn't have access to IIS, you could setup "index.asp" to redirect to "redirect.asp" - but if you wanted someone to be able to still be able to view "index.asp" you could send them to this link: "index.asp?redirect=0", and handle the "redirect" query string. Not sure what the ASP equivalent is, but this is what I would do for PHP. (it would be more accurate if this forum wasn't broken) if ($redirect == 0) { // show index page } else { // redirect to other page } If I am understanding this correctly, why on earth would you ever want or need to do this? Surely you would be better off replacing index.asp with the content of redirect.asp, and vice versa, then you wouldn't need to do any redirecting and both pages will be accessible how you want them to be. |
|
![]() |