1

I may be doing something wrong, but... My SP main site is http:///sites/blahblah . I want the browser to go to this main url if a user types in servername in the address. I can get this to work through IIS fine, as long as I choose anything except the hostname of the SP server as the vanity URL. I think it has something to do with the fact that that name/URL is already the home landing page of IIS of the SP server, and it's already taken over by SP. I just cant get that redirect to work. Am I missing something? Thanks in advance you kind souls!

0

You can handle this via Javascript instead of server side. (In my opinion less meddling with SP server the better). Go to the SP homepage of the server name and set the homepage to a redirect page.

Or add in javascript on the homepage to redirect (Using custom JS you can choose from different methods if you want the browser to keep a history of the page or not among other things).

Put the code in a:

window.onload = function() {}

and use the type of redirect you want:

//similar behavior as an HTTP redirect
window.location.replace("http://stackoverflow.com");

//similar behavior as clicking on a link
window.location.href = "http://stackoverflow.com";

Here is a good discussion on JS redirects: Here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.