Difference between revisions of "Mura"

From Hostek.com Wiki
Jump to: navigation, search
m (Upgrading Mura)
(Upgrading Mura)
Line 12: Line 12:
  
 
'''Update/Upgrade Mura by running the auto-aupdate feature from your admin section''':
 
'''Update/Upgrade Mura by running the auto-aupdate feature from your admin section''':
*Click the "Site Settings" link in the Mura admin. (This is the page that lists the sites that have been created in you Mura instance.)
+
*Click the '''Settings''' link at the very top of the Mura admin page.
*Click the "Update Core Files..." link above the table that lists your sites:
+
*Click '''Update Mura Core''' in the dropdown menu that appears
[[File:Muraupdate.png]]
+
*In the popup that appears, click '''Yes''' to proceed with the automatic upgrade.
  
 
Mura will confirm when the update completes. Please note, this will not update your site files. <br /><br />
 
Mura will confirm when the update completes. Please note, this will not update your site files. <br /><br />

Revision as of 21:57, 15 January 2014

Introduction

Here you'll find a compilation of issues or tips related to the Mura content management system.

To fix many Mura issues, upgrading Mura itself may be your best solution. Find more on that below.


Upgrading Mura

If your ColdFusion site runs Mura CMS, you should ensure it's "Core Files" are always up-to-date. This is easy to do from the Mura Admin section and will help improve performance and security. Follow the directions below to update your Mura Core Files:

Update/Upgrade Mura by running the auto-aupdate feature from your admin section:

  • Click the Settings link at the very top of the Mura admin page.
  • Click Update Mura Core in the dropdown menu that appears
  • In the popup that appears, click Yes to proceed with the automatic upgrade.

Mura will confirm when the update completes. Please note, this will not update your site files.

For more info on this topic, see the Mura Best Practices Guide.

Editing Mura SEO SEF URLs - Overview

How to enable different SEO/SEF URL settings for Mura

The URLs used by Mura are controlled by two settings in the configuration file /config/settings.ini.cfm:

siteidinurls=0
indexfileinurls=0

A settings of '0' disables the option, and a setting of '1' enables the option.

siteidinurls

This option tells Mura to put the siteid in the URLs for links. Enable this option if you would like the name of the site to appear in the URL. Otherwise, disable it.

indexfileinurls

This option controls whether Mura puts index.cfm in the URLs for links. Enable this option if you want index.cfm to appear in the URL or do not want to use URL rewriting. Disable this option if you would like to use URL rewriting or do not want index.cfm shown in the URL.


Site ID and index.cfm in URLs

This option is easy to enable. Simply configure both URL settings in the /config/settings.ini.cfm as follows:

siteidinurls=1
indexfileinurls=1


Remove Site ID and index.cfm from URLs

This is the most common SEO/SEF setting. Configure both URL settings in the /config/settings.ini.cfm as follows:

siteidinurls=0
indexfileinurls=0

Then, do one of the following:

IIS 6:

Rename the file htaccess.txt to .htaccess.


IIS 7+:

Rename the file web.config.txt to web.config.

Remove Site ID from URLs but include index.cfm in URLs

This option is easy to enable. Simply configure both URL settings in the /config/settings.ini.cfm as follows:

siteidinurls=0
indexfileinurls=1


Include Site IDs in URLs but remove index.cfm from URLs

Configure both URL settings in the /config/settings.ini.cfm as follows:

siteidinurls=1
indexfileinurls=0

Then, do one of the following:

IIS 6:

Rename the file htaccess.txt to .htaccess. Then, edit the .htaccess file and follow the instructions in the file for enabling SiteIDs in URLs.


IIS 7+:

Rename the file web.config.txt to web.config. Then, edit the .htaccess file and follow the instructions in the file for enabling SiteIDs in URLs.


Mura Problems and Solutions

Fixing Mura links with Hyphens in the URL

When enabling SEO-friendly URLs, sometimes you run into pages that need multiple words in the URL. This requires the use of a hyphen, which often breaks Mura's redirection system. Below is an overview on the problem.

Overview

Example situation:

http://www.example.com/ has a few pages on their Mura site that look like this:
http://www.example.com/mura-page
http://www.example.com/links-and-examples

With the default Mura redirection rules, these links will cause IIS to parse the links instead of the Mura CMS, which takes the user to a 404 page. The fix is simple, but can be tricky to implement if you're unfamiliar with .htaccess files.

.htaccess Fix

The hyphen has to be the last character in the .htaccess character expression. Otherwise, it signifies a range between two characters.

So, you just have to move the hyphen to the end of the character expression in your .htaccess rewrite rules. Below is what the .htaccess file should look like with the change:

# This is for rewriting urls "WITHOUT" siteIDs
# To remove the Mura siteID directory and index.cfm from urls you must also set both siteIDInURLS and indexFileInURLs to 0 in your /config/setting.ini.cfm and reload Mura.
Options +FollowSymLinks
RewriteEngine On 
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-d
RewriteRule ^([a-zA-Z0-9/-]+/tag/.+|tag/.+)$ /index.cfm%{REQUEST_URI} [PT]
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-d
RewriteRule ^([a-zA-Z0-9/-\s-]+)$ /index.cfm%{REQUEST_URI} [PT]

The last line has a hyphen added right after the 's':

RewriteRule ^([a-zA-Z0-9/-\s-]+)$ ...

Once this change has been made your URLs with hyphens should now be functional! Below is a full, fixed .htaccess file. Make sure to remove the single #'s for whichever rewrite is currently enabled on your site:

## This is for rewriting urls "WITHOUT" siteIDs
## To remove the Mura siteID directory and index.cfm from urls you must also set both siteIDInURLS and indexFileInURLs to 0 in your /config/setting.ini.cfm and reload Mura.
# Options +FollowSymLinks
# RewriteEngine On 
# RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-d
# RewriteRule ^([a-zA-Z0-9/-]+/tag/.+|tag/.+)$ /index.cfm%{REQUEST_URI} [PT]
# RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-d
# RewriteRule ^([a-zA-Z0-9/-\s-]+)$ /index.cfm%{REQUEST_URI} [PT]

## This is for rewriting urls "WITH" siteIDs
## To remove the Mura siteID directory and index.cfm from urls you must also set siteIDInURLS to 1 and indexFileInURLs to 0 in your /config/setting.ini.cfm and reload Mura.
# RewriteEngine On
# RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-d
# RewriteRule ^([a-zA-Z0-9-]{1,})/^([a-zA-Z0-9/-]+/tag/.+|tag/.+)$ /$1/index.cfm/$2 [PT]
# RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-d
# RewriteRule ^([a-zA-Z0-9-]{1,})/([a-zA-Z0-9/-\s-]+)$ /$1/index.cfm/$2 [PT]

Mura 404 Errors

Ensure the Page Exists Within Mura Site Manager

If you encounter a 404 error on a Mura site, the first thing to check is that the page giving the error is actually created in Mura. A common example of this is some links on Mura's default site (the sample site loaded upon installation) such as the Sitemap link will give a 404 error. This is because the page needs to be created within Mura's Site Manager.

Check the Site's Rewrite Rules

If you've already made sure the URL giving the 404 has a corresponding page within Mura's Site Manager, then you'll need to make sure your rewrite rules are correct. If the page giving a 404 consists of two words, then you may just need to implement the ".htaccess" fix described above to ensure Mura rewrites the dashes between words properly.