Manual 301 redirect question

This is an open forum for any mojoPortal topics that don't fall into the other categories.

This thread is closed to new posts. You must sign in to post in the forums.
10/20/2010 4:02:20 AM
Gravatar
Total Posts 160
mojoPortal Community Expert
Designer of over 25 unique and custom mojoPortal sites with DMSQD and sister company, The Design Loft - www.dmsqd.com

Manual 301 redirect question

Hi Joe

We've got a site that is being moved from an Apache rig to mojoPortal. SEO is very important on this site and we've achieved some really great rankings.

My question is about using mojoPortal's manual 301 redirect manager to ensure a smooth transition.

Normally we'd write some server side code to deal with this or tinker with the .htaccess if it was a PHP site, but I'm wondering can we use the built in feature of mojo to set up a redirect from:

www.domain.com/old-page.html

to

www.domain.com/new-mojo-page.aspx

The reason I ask is that of course the old page isn't in part of the mojo hierearchy so I didn't know if it'd work, i.e. do the pages / URLs you're directing from have to have been part of the CMS install?

If we can't use the system for this, any experience with the best way of doing it?

Thanks

Mark

10/20/2010 9:37:46 AM
Gravatar
Total Posts 18439

Re: Manual 301 redirect question

I' not 100% sure if it is possible but in order for it to work then .NET must be the handler for .html files. In IIS 7.x using Integrated pipeline mode, you can make .NET handle all requests using the same configuration that is needed for extensionless urls. Then "maybe" the 301 manager can do that.

Hope it helps,

Joe

10/20/2010 10:52:30 AM
Gravatar
Total Posts 2239

Re: Manual 301 redirect question

I can confirm that this works. I have a lot of old PHP and HTML pages redirected through the 301 Manager. Check this link out as an example: http://i7media.net/co_contact.php.

-Joe D.

10/20/2010 12:16:50 PM
Gravatar
Total Posts 45

Re: Manual 301 redirect question

I can confirm that this works as I've set them up under IIS 7.x by adding a Managed Handler for the *.htm files.  I just copied the settings for the *.aspx managed handler for PageHandlerFactory-Integrated-4.0 to the new *.htm managed handler.

10/21/2010 6:51:39 AM
Gravatar
Total Posts 18439

Re: Manual 301 redirect question

Thanks guys! I've updated the document here to make that more clear. http://www.mojoportal.com/301-redirects.aspx

Best,

Joe

10/21/2010 6:54:13 AM
Gravatar
Total Posts 160
mojoPortal Community Expert
Designer of over 25 unique and custom mojoPortal sites with DMSQD and sister company, The Design Loft - www.dmsqd.com

Re: Manual 301 redirect question

Thanks all, just hope I can achieve this through my host!

Again, thanks.
Mark

10/28/2010 5:49:28 AM
Gravatar
Total Posts 160
mojoPortal Community Expert
Designer of over 25 unique and custom mojoPortal sites with DMSQD and sister company, The Design Loft - www.dmsqd.com

Re: Manual 301 redirect question

Hi guys

Just had confirmation from my host that we're running IIS 7.5 in integrated pipeline mode; I used the extension less URLs documentation and then set up a redirect from "/test.html" to "contact.aspx" and it works fantastically.

Thanks all!

3/22/2011 4:57:13 PM
Gravatar
Total Posts 15

Re: Manual 301 redirect question

I'm having a related issue in that I'm coming from a wordpress site and running can't get the 301 redirect handler to work for the default format of wordpress pages.  For example mysite.com/ct/?page_id=11 would be the old URL and I have mojo installed in the same /ct structure but when I put in a redirect for that URL it just ends up on the mojo home page.  I'm guessing it's because the /ct/?page_id=11 is just handled by default.aspx and mojo ignores the wordpress formatted parameter.   Is there any way to get the old URLs of the form ?page_id=xx to be redirected to a specific mojo page?

Thanks, Mark

3/22/2011 6:42:33 PM
Gravatar
Total Posts 139
"All that is gold does not glitter, not all those who wander are lost;" --J.R.R. Tolkien

Re: Manual 301 redirect question

Are you using HTML pages handled by .net?  Then it might work.  The URL you showed us doesn't look like that. 

3/22/2011 7:14:41 PM
Gravatar
Total Posts 15

Re: Manual 301 redirect question

I can redirect /ct/test.html just fine and also /ct/test.php (I'm using IIS 7.5 with the friendly URLs) but the issue seems to be the URLs that are really just to the root like /ct/?page_id=xx.  On the old server I believe php was basically processing this via index.php since it was a default document for that directory and it then interpreted the page_id to send it to the right page.  So I think mojo is pretty much doing the same thing but using default.aspx but since mojo is looking for the pageid querystring parameter rather than page_id it just stays on the default.aspx home page.  It's almost like I would need to modify the behavior of default.aspx to check for a page_id paramter and if found map it to the correct URL since the redirect isn't working for the root directory with no page specified.

Thanks, Mark

3/25/2011 2:06:29 PM
Gravatar
Total Posts 15

Re: Manual 301 redirect question

I did some more research and the issue is that a URL like mysite.com/ct/?page_id is passed to default.aspx and so there isn't a way to redirect that in the redirect manager (I tried /ct/?page_id=11 for example).  So the solution I ended up with was creating a Redirect.aspx file in the mojo root directory and am manually doing 301 redirect using the Response object based on the page_id parameter (if it's present).  If it's not present (i.e. it may be a normal mojo request to the root directory) then I do a Server.Transfer to default.aspx to let the normal mojo processing occur.  In IIS I had to set the default document of the Redirect.aspx to be higher priority than default.aspx.

Thanks, Mark

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