Forum Discussion

  • Two options:
    (1) If you want to make the redirection from the default page and this is a classic page, you can add a content editor WebPart there with the JS Code that makes the redirection
    (2) If the home page is a modern page, then you will need to create a SPFx extension where you can add the redirection
    • Adrian Urgyan's avatar
      Adrian Urgyan
      Copper Contributor

      It is still a classic page. Is there a better way than a JS code? It's client side redirection, a server side could be more smooth (if it's available at all!).

      • jcgonzalezmartin's avatar
        jcgonzalezmartin
        MVP
        In SPO you cannot do anything on the server side...it has to be a client side redirection
  • Hi Adrian Urgyan ,

    there is a no code solution, with out-of-the-box features.

    You can activate SharePoint Server Publishing Infrastructure feature (

    Go to Site Settings->Site Collection Administration->Site collection features) and change PageLayout) and use Redirect PageLayout.

    After feature activaction 

    1. Go to the gear button, click on the site settings
    2. Under look and feel, click on page layouts and site templates


    page layout screenand change the page layout of default.aspx page to "Redirect Page".<

    Configure it in this way  adding target url for redirect new redirect page

    Cheers,

    Federico

     

    • Placebo's avatar
      Placebo
      Brass Contributor

      FedericoPorceddu82  your solutions sounds like what we just want to do to our riit site page. I have actived the Server Publishing infrastructure feature. But under "Look and feel" we don't have the option "page layouts and site templates".  I can only choose from the following (and I'm not really sure how to proceed how to apply your tip ):

       

      Look and Feel
      Design Manager
      Title, description, and logo
      Device Channels
      Navigation Elements
      Change the look
      Import Design Package
      Navigation

       

      • Dean_Gross's avatar
        Dean_Gross
        Silver Contributor

        Placebo  The server Publishing Feature is very old and provides very limited functionality. There are many newer, better ways to manage the page publishing process. Those old page layouts cannot be used with the new Modern pages. I don't recommend using these older/classic techniques.  There is a new Page Template feature rolling out that should be considered.

Resources