301 Redirect

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.

This forum is for discussing mojoPortal development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
9/26/2008 10:00:29 AM
Gravatar
Total Posts 43
Partner

301 Redirect

One of my clients is very conscientious about search engine optimization. They would like to issue a 301 redirect for decommissioned pages. Here is an article:

www.webconfs.com/how-to-redirect-a-webpage.php

301 Redirect
301 redirect is the most efficient and Search Engine Friendly method for webpage redirection. It's not that hard to implement and it should preserve your search engine rankings for that particular page. If you have to change file names or move pages around, it's the safest option. The code "301" is interpreted as "moved permanently".

Is there a feature in the mojoPortal that would facilitate this request?

9/26/2008 10:22:01 AM
Gravatar
Total Posts 18439

Re: 301 Redirect

Hi Todd,

For "decommissioned pages" as in deleted pages that no longer exist, the correct response is 404, page not found, and this is exactly what will happen in mojoPortal.

For cases where the page still exists but has a new url, we do not want a 404 for the old url and use of 301 is meant to solve this problem.

In mojoPortal we use short urls based on the title of the page and since we don't reflect the site hierarchy in the url, you can freely move pages around without changing the url and this gives us a freedom to move pages around without affecting established page ranking or breaking bookmarks that visitors may have made.

In the case where a page is renamed and the url does change, for example if I have a page named Product List with an url of /productlist.aspx and I later decide for some reason that I want to change the name to Product Catalog and the url will change to productcatalog.aspx. The way mojoPortal handles this right now is that the menu and the site map (both the user site map and the google site map) and all links for the page generated by mojoPortal will now reflect the new url /productcatalog.aspx, but the old url /productlist.aspx still works and does not break, so we have no 404 and no broken bookmark in this case. We merely de-emphasize the old url and promote the use of the new url.

Now I suppose it would be possible if we decide that we would rather have a 301 for renamed pages with changed urls if the url that brought us to the page is not the current url we could implement logic to do that redirect fairly easily. I'm just not sure whether thats really a better solution than what we do now or not.

Best,

Joe

10/4/2008 9:57:53 AM
MJG
Gravatar
Total Posts 1

Re: 301 Redirect

Now I suppose it would be possible if we decide that we would rather have a 301 for renamed pages with changed urls if the url that brought us to the page is not the current url we could implement logic to do that redirect fairly easily. I'm just not sure whether thats really a better solution than what we do now or not.

From an SEO standpoint, it is better to do a 301 redirect to the new page when something is moved than to show the same content on both URLs. Standard thinking in the SEO community is that duplicate content is penalized, or worse yet, disregarded entirely by the major search engines.

Your original point is true that decommissioned pages should get a 404 status but MOVED or renamed pages should get a 301 instead.

Just my .02 worth.

10/4/2008 10:06:02 AM
Gravatar
Total Posts 18439

Re: 301 Redirect

Thanks for the input. I'm going to implement a feature for this soon.

I'll add a table and create a UI for managing urls that need to be redirected. Then I will modify the code so that if a page is renamed and gets a new url the old url and the mapping to the new one will go into this table. It will also be possible to add arbitrary redirects as well, but it will only work for pages handled by .NET, ie pages with a .aspx extension.

Best,

Joe

3/4/2010 7:24:22 PM
Gravatar
Total Posts 1203
Proud member of the mojoPortal team

Help support mojoPortal!
Add-on modules

Re: 301 Redirect

Sorry for the ancient bump, but we've got a little situation with redirects. We had an existing page that was renamed, then, then renamed again, so there were two 301 Redirect entries. Now we wanted to rename a different page to the original page name. The site wouldn't let us do it, saying it was already in use.

I cleared all of the 301 Redirects in Advanced Tools, and touched web.config, but the site is still giving an error that the original page already exists.

Is there a way to correct this other than diving into the database itself? I hate to do that since the chance of messing something up rises astonomically.

Thanks!

Jamie

3/5/2010 7:15:04 AM
Gravatar
Total Posts 18439

Re: 301 Redirect

Hi Jamie,

You probably need to find the original friendly urls you want to re-use in Url Manager and if they are not pointing to the correct pages then delete them. After that you should be able to re-use them.

Hope it helps,

Joe

3/8/2010 10:23:18 AM
Gravatar
Total Posts 1203
Proud member of the mojoPortal team

Help support mojoPortal!
Add-on modules

Re: 301 Redirect

Thanks, Joe. Sounds like I should have started with URL Manager.

11/10/2011 12:19:36 PM
Gravatar
Total Posts 6

Re: 301 Redirect

Hello,

Sorry to tag onto an old thread, but this is kind of related. I am trying to redirect from one domain to another. One (old one) was not in mojoportal and the other is. We have the DNS of the old domain which was Classic ASP pointing to the MojoPortal DNS hosting multiple sites. I need to do something like"olddomain.com/specificpage" to "newdomain.com/specificpage" I checked the "Redirect Manager" but there is no way to change the domain. I found this doing an internet search, but I am not sure where to put it or if it will work, because the web.config at the root connects to the database entries I think.

<location path="http://olddomain.com/directory/page.asp">
    <system.webServer>
      <httpRedirect enabled="true" destination="http://newdomain.com/directory/page.aspx" httpResponseStatus="Permanent" />
    </system.webServer>
  </location>

11/13/2011 7:47:02 AM
Gravatar
Total Posts 18439

Re: 301 Redirect

To do something like that ASP.NET would have to be configured as the handler for .asp extension.

Then you might be able to assign both host names to the site and force a preferred host name, and setup a 301 from the .asp url to the .aspx url

However in mojoPortal using extra segments in the url is not supported, it "may work" but it is not recommended nor officially supported for reasons mentioned in our Search Engine Optimization article and there is no promise that it will work or won't break in future releases if it does work now. So I would redirect to an url without that extra /directory/ segment even if the old url has that segment.

If you cannot achieve it using mojoPortal, there might be other ways to implement that 301 outside of mojoPortal using the IIS Url rewrite module, which supports 301 redirects.

Hope that helps,

Joe

You must sign in to post in the forums. This thread is closed to new posts.