Difference between revisions of "Mura"
(Created page with "=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 bes...") |
(→.htaccess Fix) |
||
Line 105: | Line 105: | ||
==.htaccess Fix== | ==.htaccess Fix== | ||
− | The hyphen has to be the last character in the .htaccess character expression | + | 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: | 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: |
Revision as of 02:02, 29 August 2013
Contents
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 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 "Update Core Files..." link above the table that lists your sites:
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.
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 easy, but somewhat tricky.
.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]