SharePoint Redirect

Aug 21, 2008 at 1:48 PM
I have been reading over the examples in the "read me" and trying different things, but I don't seem to have the expression correct.  Basically, I want to redirect any user that goes to to  I need the users redirected to a anonymous site so they can register if they don't have an account.  Is this possible? 
Aug 21, 2008 at 4:46 PM

It's possible but you need to be able to distinguish between users that have an account and users that don't.

Can you do that just by looking at the URL or server variables? 

Also, with sharepoint 2003, there are some issues with ISAPI hostility.  Basically SPS2003 can stomp on other ISAPIs, including IIRF.

If you don't care to check for whether people are registered or not, then the expression to redirect might simply be this:

RewriteCond %{SERVER_PORT} 443
RewriteRule  ^/$ [R]

The RewriteCond checks for port 443, which is in use if the incoming request is https://whatever. Then the rule just redirects to Welcome.aspx, if the URI request is "nothing"

Aug 21, 2008 at 6:29 PM
Thank you very much for the response!  At this point I just want to send everyone to the same page so I am not worried if they have an account or not.  What would be the easiest way to redirect based on the url they type instead of the port?  I can't redirect based on the port because I will need to refer back to that site with other links that specify an actual page. 
I just need to redirect over to    
Aug 23, 2008 at 3:07 PM

I can't redirect based on the port because I will need to refer back to that site with other links that specify an actual page.

I don't know what you mean - not sure why redirecting based on the port is not sufficient.  If they type in a URL with https as the scheme, then the SERVER_PORT is going to be 443.  I don't know what your links have to do with anything. Another option is to use the server variable HTTPS, which is either "on" or "off", depending on if they type in https or http.  so that would look like this:

RewriteCond %{HTTPS} on 
RewriteRule  ^/$ [R]

what this says is, if anyone tries to use HTTPS, then he will always be redirected back to the welcome.aspx page. It sounds like this rule will not work very effectively, at least not on its own without other rules. Your users will never be able to use https. Is that what you want?

I think you will have to test your setup pretty thoroughly.