Change the website address

Post here for help with installing or upgrading mojoPortal pre-compiled release packages. When posting in this forum, please provide all relevant details. You may also want to review the installation or upgrading documentation.

If you have questions about using the source code or working with mojoPortal in Visual Studio, please post in the Developer forum.

Post here for help with installation of mojoPortal pre-compiled release packages

When posting in this forum, please try to provide as many relevant details as possible. Particularly the following:

  • What operating system were you running when the bug appeared?
  • What database platform is your site using?
  • What version of mojoPortal are you running?
  • What version of .NET do you use?
  • What steps are necessary to reproduce the issue? Compare expected results vs actual results.

You may also want to review the installation or upgrading documentation.

If you have questions about using the source code or working with mojoPortal in Visual Studio, please post in the Developer forum.

This thread is closed to new posts. You must sign in to post in the forums.
6/16/2009 2:49:56 PM
Gravatar
Total Posts 2

Change the website address

Change the website address

I have built my mojoportal website on a dummy website address like http://mojoportal.website.com . Now I that I'm
finished with my site I what it to change to http://www.website.com What are the steps that needs to be taken.

Big thanks for your support and super portal!!!!

Greetings Paul

Operating System: Windows 2003 Server
Database platform: MySQL
MojoPortal Version 2.2.8.2

6/17/2009 6:17:10 AM
Gravatar
Total Posts 18439

Re: Change the website address

Given that the urls structures are the same in theory there should not be much trouble. You are using an older version of mojoPortal, links and images posted in the blog or forums in that version will have fully qualified urls so you may need to correct those to the new urls. Other features all use releative urls. The blog and the forum used to use fully qualified urlas because they have outbound rss feeds that needed fully qualified urls. In newer versions of mojoPortal we use relative urls in the blog and forums and we make them fully qualified on the way out by processing the feed to change relative urls to fuly qualified ones.

Its smart that you did it using a host name instead of a virtual directory like http://www.website.com/mojoportal becuase then you would have a change in url structure and there would be more cleanup needed.

Hope it helps,

Joe

6/20/2009 3:52:36 AM
Gravatar
Total Posts 2

Re: Change the website address

Hi Joe,

Big thanks for your reply. I just copied all files in the root and it just worked. I will indeed
upgrade the website to the latest version. 

Grtz Paul

6/24/2009 10:14:49 AM
Gravatar
Total Posts 2254

Re: Change the website address

So what is the extra cleanup required for moving a site from a virtual directory to the root?

I did this for a customers site and I will need to move it when the site is complete.

-Joe 

6/24/2009 10:25:20 AM
Gravatar
Total Posts 18439

Re: Change the website address

Hi Joe,

The thing to understand is that relative urls are always relative to the root of the web site, so even though we use relative urls there is a difference between /home.aspx and /mojo/home.aspx even though they are both relative urls.

So if you create the content with site running as a virtual directory in the mojo folder for example, the friendly urls have /mojo/pagename.aspx for the friendly part and /mojo/Default.aspx?pageid=x for the real url. So the cleanup would invlove removing the extra segments from the urls if the site were moved to a root level.

The FCKeditor image browser also uses relative urls as does the link browser which allows browsing and linking to pages within a site, so there may be urls in the content that need fixing as well. Of course the normal link dialog ues fully qualified urls as it can link to external pages, but if you use it to link to local pages those urls may also need fixing. 

So, its much better to populate the site using the same url structure that it will have in production use to avoid the need for cleaup as much as possible.

Hope it helps,

Joe

6/24/2009 10:42:10 AM
Gravatar
Total Posts 2254

Re: Change the website address

So, would I need to run some queries against the DB to replace all instances of /mojo/ with / ? If it is DB cleanup, I can definitely handle it. 

The site is already somewhat populated and would take me a few hours to re-populate it. If you think the cleanup would take longer than that, I will just recreate the site.

I had a funny feeling when I created the site in a Virtual Directory and I knew I should use a subdomain (as I usually do) but I ignored my instinct. That was dumb!

Thanks for your help.

-Joe

6/24/2009 11:31:10 AM
Gravatar
Total Posts 18439

Re: Change the website address

Unless there's just a huge amount of pages I would just edit directly in the table rather than take a chance on a query. You will need to edit mp_FriendlyUrls, mp_Pages, mp_BlogPosts to correct the urls.

Hope it helps,

Joe

11/4/2009 8:01:52 PM
Gravatar
Total Posts 1

Re: Change the website address

I have a similar problem I'm hoping you guys can help me resolve. I would love to use mojoportal in conjunction with a site that will have enhanced security requirements. Most basically, these include that the entire site will be run in https and on a non-standard port (444).

Using the Microsoft Web Platform, the installation works fine. I am also able to go to the initial page that performs setup. The setup link itself after installation works, going to my https site on port 444. The setup page at /mojoportal//setup/default.aspx reports all positive/success information, including connection to the database, database creation, permissions, etc. However, the link at the end of the setup pages contents seems to get redirected immediately to a bad URL, specifically having the base URL changed to not have https nor the port. I also even tried fixing the URL manually, which did take me to a page of the mojo portal, but it reports simply that the page/item cannot be found.

As a developer, it would appear that the correct base URL, including https and the port, is being registered somewhere for URL construction, but that certain features may not be using it for URL construction, causing misdirection. It also appears from the error that fixing the URL manually doesn't fix this, perhaps caused by the wrongly constructed URL being registered somewhere instead of the proper one.

Is this something I can fix or work around? I would be happy to contribute to this project, but I would like to start with something relatively working so I can meet my business needs first.

Thanks for any help you can provide!

11/5/2009 5:20:59 AM
Gravatar
Total Posts 18439

Re: Change the website address

Hi,

You raise an interesting scenario. I admit I have never tried the installation on a machine where ssl was required for every request right from the start and using an alternate port for ssl. I will make a note to come up with an easier way to handle this situation.

In the mean time here are steps that  I think should solve the problem.

1. Put this in your user.config file:

<add key="SSLIsAvailable" value="true" />
<add key="AlternateSSLPort" value="444" /> 

2. Here is the ugly part, go into the database manually and in the mp_Sites table there should be an existing row, set the bit field UseSSLOnAllPages to 1 or true.

3. Touch the Web.config file to make it reload settings. ie type a space in it and save it.

4. Visit your site at https://yourrooturl:444/Default.aspx

Hope it helps,

Joe

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