How to Redirect My Site?

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
13 years ago
Hi,

How do I redirect my site so users click on my domain and all they see is the "Under Construction" WHILE I still can provide my boss a differrent link to view the work I do?

Many thanks!
13 years ago
I would try putting in logic to handle a querystring value like this
http://www.yoursite.com/default.aspx?redir=true  <--  this is what you would give your boss to view

In the codebehind for default.aspx get the querystring 'redir' value and redirect to the under construction page (ie UnderConstruction.aspx) if the redir is not = true

pseudocode -

get querystring value in put it in var 'redir'
If session("FirstVisit") is nothing
   if redir = 'true' then
         set session("FirstVisit")=false   'do this so any subsequent visits to default.aspx for session doesn't result in a loop
         redirect to store default.aspx  ' kind of redundant as it redirects to itself, here for clarity
   else
       redirect to underconstruction.aspx page   ' visitors who don't know to enter querystring redir=true will go here
    end if
end if

Give that a shot, I *think* that will work although it's untested. :-)

Shawn
NopAdmin.com
13 years ago
Seems easier to put the shop on a sub-domain, and then just move everything to your real domain when the work is done.
13 years ago
Thanks guys for the great tips!

Regards,
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.