Category Archives: ColdFusion

Removing siteid and index.cfm from Mura URLs

In this article we will be going through the way to change your Mura CMS URLS from:

http://www.yourdomain.com/default/index.cfm/page/sub-page/

INTO

http://www.yourdomain.com/page/sub-page/

To remove the siteID directory in the URL:
In the local contentRenderer.cfc ([www/[siteID]/includes/contentRenderer.cfc) uncomment the function named getURLStem() or paste the below code at the base of the file:



    
    
    
        
     
        
    

Edit www/index.cfm and replace:

with

The .htaccess file / code to remove the index.cfm:

RewriteEngine On

# If it's a real path, just serve it
RewriteCond  %{REQUEST_FILENAME}  -f  [OR]
RewriteCond  %{REQUEST_FILENAME}  -d
RewriteRule  .  -  [L]

# Redirect if no trailing slash
RewriteRule  ^(.+[^/])$  $1/  [R=301,L]

# Rewrite Mura CMS URL paths
RewriteRule  ^(.*)$  /index.cfm%{REQUEST_URI}  [L]

The old /[siteID]/ urls will still work after making these changes.

Why I love CFML

I was looking at integrating a new video encoding service into one of my projects and clicked on their developer link to see if they had sample code. I was then jazzed to find out that they had CFML sample code since that is my platform of choice. Looking at the sample code page I was blown away at how much easier it was to do the XML API integration with CFML than with other popular languages. The site was encoding.com, you should definitely take a look.