Redirect home page

Jon Wynveen asked on May 1, 2014 09:30

I would like to redirect the home page to a specific page on the site. The page redirected to will change over time as this is a micro-site and will redirect you to the current event happening. I can't seem to get the home page to redirect at all though.

In Site Manager->Settings->Content, I've set the Default Alias Path for the site to the page I want. For an example, let's say it's /page-name. This correctly renders that as the home page, but I would like it to redirect to /page-name instead of staying on the root of ~/.

In Site Manager->Settings->URLs and SEO, I set 'Redirect document aliases to main URL' to true in an attempt to force a redirect, but that doesn't seem to work for the home page. For reference, I did change 'Allow permanent (301) redirection' to false since the page being redirected to will change over time and I don't want a cached 301 redirect.

Also in Site Manager->Settings->URLs and SEO, I changed the dropdown for 'Default Page' to 'Use page defined by default alias path,' but I see no effect with that either.

How can I get the home page to do a redirect instead of just a rewrite? I would like to do it in a way that doesn't involve code so that CMS editors can do it when new events are created that need to have the home page redirected.

Recent Answers


Brenden Kehren answered on May 1, 2014 11:25

I'd say leave everything in the site settings alone (leave the 301 redirection on). Then in the CMSDesk, whatever page you specified as the home page in the Site Manager, go to that page properties>Navigation and enter a URL Redirection (/your-new-home-page) whenever that home page changes. Then you don't need to mess with any of the global site settings.

0 votesVote for this answer Mark as a Correct answer

Jon Wynveen answered on May 1, 2014 12:02

That's exactly what I was looking for. For some reason I didn't see the redirect option in the navigation tab before. I've now set up a /Home page that I'll just change the redirect on whenever needed.

Regarding the 301 redirection, what does that option apply to? I don't want this redirect to be a 301 since it will change occasionally. Is that something that is only applied when someone goes to an alternate alias of a document and it will do a 301 to the primary URL for that document?

I just noticed that setting the redirect in the navigation tab is actually causing a 301 (even with the 301 option turned off). This will be problematic when I need to change that to redirect to a different page as it will be cached in users' browsers. Is there a way I can make that a 302?

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on May 1, 2014 15:50

You could use the window.location javascript and do it that way, I don't believe that causes a 301.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.