Removing index.cfm From Mura CMS URLs on Windows/IIS7

If you have an installation of Mura CMS on Windows running IIS7+ and you're looking to remove "index.cfm" from the URL for search engine optimization (SEO) or any other reason, then here's a pretty simple and painless method to do just that.

First, IIS7 does not have their URL Rewrite Module installed by default. So you'll need to download and install URL Rewrite Module 2.0 for your server (x86 / x64).

After that's done, your next decision is to choose whether or not you wish to have the SiteID display in the URL. Some users prefer to have that, and some don't depending on their particular usage of Mura.

Option 1: Allow For Missing SiteID AND index.cfm From The URL

Create a "web.config" file with the following code and place it at the root of your Mura installation:

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <rewrite>
            <rules>
                <rule name="Mura CMS Rewrite Option 1" enabled="true">
                    <match url="^([a-zA-Z0-9/-]+)$" ignoreCase="false" />
                    <conditions logicalGrouping="MatchAll">
                        <add input="{DOCUMENT_ROOT}{URL}" matchType="IsDirectory" ignoreCase="false" negate="true" />
                    </conditions>
                    <action type="Rewrite" url="/index.cfm{URL}" />
                </rule>
            </rules>
        </rewrite>
        <defaultDocument>
            <files>
                <remove value="index.cfm" />
                <add value="index.cfm" />
            </files>
        </defaultDocument>
    </system.webServer>
</configuration>

Then, update your settings.ini.cfm file with the following settings and from the Admin > Reload Application:

siteidinurls=0
indexfileinurls=0

Option 2: Allow For Missing index.cfm From The URL, But Keep SiteID

Create a "web.config" file with the following code and place it at the root of your Mura installation:

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <rewrite>
            <rules>
                <rule name="Mura CMS Rewrite Option 2" enabled="true">
                    <match url="^([a-zA-Z0-9-]{1,})/([a-zA-Z0-9/-]+)$" ignoreCase="false" />
                    <conditions logicalGrouping="MatchAll">
                        <add input="{DOCUMENT_ROOT}{URL}" matchType="IsDirectory" ignoreCase="false" negate="true" />
                    </conditions>
                    <action type="Rewrite" url="/{R:1}/index.cfm/{R:2}" />
                </rule>
            </rules>
        </rewrite>
        <defaultDocument>
            <files>
                <remove value="index.cfm" />
                <add value="index.cfm" />
            </files>
        </defaultDocument>
    </system.webServer>
</configuration>

Then, update your settings.ini.cfm file with the following settings and from the Admin > Reload Application:

siteidinurls=1
indexfileinurls=0

Your site should now be able to handle URLs that are missing index.cfm.

Cheers!

Related Blog Entries

Comments
Steve: Thanks for this information. It just occurred to me that our development site is using II6. Is there an alternate program to use in this case.

...Wes
# Posted By Wes Anderson | 9/15/11 9:54 AM
Okay, I answered my own question. I downloaded the Helicon app and installed it. I've set everything up per your previous blog and now the index.cfm is gone. Problem is now when I click on a link I'm getting "page cannot be found".

Any advice on how to rectify this?

...Wes
# Posted By Wes Anderson | 9/15/11 10:04 AM
Steve,

I'm trying to create a URL Rewrite based on option 2, but I have MURA installed under a subdirectory named "mura". I would like to set things up so a user can use the URL "http://domain_name/siteID/";, even though the actual rewrite path should be "http://domain_name/mura/siteID/index.cfm/site_subd...;. Is there a way to do this, or will it not work if MURA is installed in a subdirectory? If you could provide me with any help on this, I would appreciate it. Thanks!
# Posted By Jon Saltern | 11/3/11 12:42 PM
Thanks, Steve. SO easy...
# Posted By Catherine Mortali | 12/9/11 6:22 PM
Thanks Steve! This worked out great for me!
# Posted By Lynn | 9/4/13 11:41 AM
This might help other people in future.

If you are migrating a site and need to add lots of redirects to handle new seo ... Add a rewrite map before the mura specific rule:
<rule name="Redirect rule1 for Redirects">
<match url=".*" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="false">
<add input="{Redirects:{REQUEST_URI}}" pattern="(.+)" />
</conditions>
<action type="Redirect" url="{C:1}" appendQueryString="false" />
</rule>

This all worked - however I ran into issues with 404's (I needed to use the siteid 404's to track in omniture, and needed to be language specific) so I set the mura 404's up, but then I ran into another issue with 404's outside of any locale (siteid) and on cf10 had issues with cfheader sending the wrong response for a 404 (200)! This was by design I understand, but I needed to track the 404's to document people fatfingering vanity urls etc.

So what I did was add this rule:

<rule name="CatchAll" enabled="true" stopProcessing="true">
<match url=".*" />
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
         <add input="{REQUEST_URI}" pattern="^/au/.*" negate="true" />

         <add input="{REQUEST_URI}" pattern="^/cn/.*" negate="true" />          <add input="{REQUEST_URI}" pattern="^/de/.*" negate="true" />
         <add input="{REQUEST_URI}" pattern="^/en/.*" negate="true" />
         <add input="{REQUEST_URI}" pattern="^/es/.*" negate="true" />
         <add input="{REQUEST_URI}" pattern="^/jp/.*" negate="true" />
         <add input="{REQUEST_URI}" pattern="^/kr/.*" negate="true" />
         <add input="{REQUEST_URI}" pattern="^/nz/.*" negate="true" />
         <add input="{REQUEST_URI}" pattern="^/tw/.*" negate="true" />
         <add input="{REQUEST_URI}" pattern="^/uk/.*" negate="true" />

</conditions>
<action type="Redirect" url="/404.cfm?page={REQUEST_URI}" />
</rule>

In my 404.cfm I added
<cfheader statuscode="404" statustext="Not Found">
then created my 404 layout and tracking codes OUTSIDE of mura framework.

Why would you do this? You don't want someone maliciously adding 100's of links to non-existent pages, or rather pages that exist but return duff content (http response 200) because Google/search engines will penalize you!



# Posted By Jon Hayes | 2/26/15 2:49 PM
@Jon,

Thanks for the info ... we've made several updates to the actual web.config that's included with Mura as well.

Also, you could probably tighten up all of those <add input ...> methods with something like:

<add input="{REQUEST_URI}" pattern="^/(au|cn|de|en|es|jp|kr|nz|tw|uk)/.*" negate="true" />

Cheers,
Steve
# Posted By Steve Withington | 2/26/15 2:54 PM
Useful information thanks for sharing with us for the informative article and get the best chance for student making an assignment
# Posted By Assignment Writing Companies | 2/28/18 2:04 AM
This model is made of http://www.bestukwatches.co.uk 18k white gold bezel and Rolex jaw steel. Rolex steel is http://www.rolexsreplicas.org.uk Rolex's 904L stainless steel. It has now been renamed as http://www.toprolexreplicauk.co.uk jaw steel. The dial is very cool and gray, very http://www.perfectreplicawatch.me.uk beautiful and banned.
# Posted By vsvs | 5/14/18 9:26 PM
Impressive article I really like it.This is a great thing and getting a lot of help for us .So many student help reading this post and easily making an assignment. https://www.pikview.com/
# Posted By pikview | 10/18/18 2:58 AM
# Posted By nik | 11/2/18 2:38 AM
You have to done wonderful job by providing here coding for removing index.cfm From Mura CMS URLs on Windows/IIS7 which are helpful for IT people who take CV writing services from CV Folks.


Best Regards,
https://www.cvfolks.co.uk/cv-builder/
# Posted By Lauren Desouza | 11/2/18 2:41 AM
kids hair extensions unice hair 360 frontal wig https://www.wighair.co.uk tape in hair extensions uk salons best salon for hair extensions https://www.leez-extensions.co.uk superdrug hair extensions short weave hairstyles pictures http://www.hairflair.org.uk wholesale program for hair integrated hair topper http://www.humanhair-extensions.co.uk
# Posted By vc | 11/4/18 8:48 PM
I used to visit this website because of this web page content genuine information http://pogogamesplay.com/get-on-top.html
# Posted By papa louie | 3/7/19 3:30 AM
I smoked it at 9pm and it’s now 6:35am and no sleep at all. arggg! note to self. great daytime strain. Great yields... I now have a ton of this strain. <a href="https://wendymccormick.com/indoor-cannabis-seeds/&...;
# Posted By Sergeeva287 | 3/11/19 8:15 AM
# Posted By Ashu | 4/16/19 6:11 AM
# Posted By Ashu | 4/16/19 6:12 AM
This is awesome blog. Information was so useful and way you explained is so good. I refer many new information from your blog. Looking forward for new informative blogs. Visit this popular website http://www.personalstatementfolks.co.uk/graduate-p...
# Posted By Ashu | 4/16/19 6:14 AM
This is amazing blog. Information was so useful and way you explained is so good. I refer many new information from your blog. Looking forward for new informative blogs. Visit this popular website http://www.personalstatementfolks.co.uk/graduate-p...
# Posted By Ashu | 4/16/19 6:18 AM
vdvbfg
# Posted By Ashu | 4/16/19 6:19 AM
This is an awesome driving article. I am fundamentally content with your amazing work. You put a truly amazingly consistent article.
http://www.jaipurescorts.net.in/
# Posted By shweta | 11/9/19 2:48 AM
I really appreciate your post. Thanks for sharing such useful information. Thanks for sharing amazing information!!!!!!
http://www.escortsinjaipur.com/
# Posted By shweta | 11/9/19 2:49 AM
I Love to read your article. Thanks. Way of expressing your knowledge through words, it touches my heart.
https://www.escortsindwarka.com/jaipur.html
# Posted By shweta | 11/9/19 2:50 AM
The substance you scattered here is to an extraordinary degree stunning. It helped me a ton to liven me up.
https://www.jaipurescorts.org/
# Posted By Your words in the article give lots of exposure to | 11/9/19 2:51 AM
Excellent thoughts at some stage in this publish, you just won a cutting-edge reader. Do you've got any remarks on your maximum current submit though
# Posted By Mumbai escorts | 2/19/20 6:42 AM
Thanks for providing some basic information tips about windows but I am already working on window7 which is the best for marketing because it is not creating any problem during the working process.
# Posted By Coursework Writing service | 9/20/20 11:51 PM
Aone assignment is a Online Assignment Work Company that offers writing services for students’ assignments, thesis, dissertations, essays, and coursework and research assignments at different academic levels from school till university.
http://www.aoneassignment.com/
# Posted By Ali Asad | 9/30/20 6:39 PM
Vid Wonders offers you the best Whiteboard Animation Company, we guarntees best result, as our team is professional and result oriented, we are the best Video Company. We are the worth considering for buisness.
https://www.vidwonders.com/animation-videos-on-whi...
# Posted By Vid Wonders | 9/30/20 6:39 PM
Samish Leather provides you the best quality of Riverdale TV Series Cole Sprouse Jacket, you can also Buy Tv Series Outfits from our store. we have our online store, you can visit our website.
https://www.samishleather.com/product/riverdale-tv...
# Posted By samish Leatheer | 9/30/20 6:40 PM
Aone assignment offers writing services for students who asks Help Me Write College Essay, assignments, thesis, dissertations, essays, and coursework and research assignments at different academic levels from school till university.
http://www.aoneassignment.com/write-college-essay-...
# Posted By hire essay | 10/30/20 5:40 PM
I truly appreciated the way you inscribe this info message thank you for sharing this Wonderful cake. Check out our website for playing amazing online games easily.
# Posted By ez slot | 11/27/20 5:32 PM
Samish Leather provides you the best quality of shearling leather jackets for women, you can also Buy Tv Series Outfits from our store. we have our online store, you can visit our website.
https://www.samishleather.com/category/shearling-l...
# Posted By samish Leatheer | 12/10/20 3:39 AM
Vid Wonders offers you the best Corporate Video Service, we guarntees best result, as our team is professional and result oriented, we are the best Video Company. We are the worth considering for buisness.
https://www.vidwonders.com/
# Posted By Vid Wonders | 12/10/20 3:40 AM
Aone assignment is a Student Assignment Help Company that offers writing services for students’ assignments, thesis, dissertations, essays, and coursework and research assignments at different academic levels from school till university.
http://www.aoneassignment.com/
# Posted By aone12347 | 12/10/20 3:41 AM
Great article it is useful and some new ideas after reading this article it is useful and a lot of new things and getting a lot of writing.
# Posted By Islamic Scholar | 1/13/21 1:11 AM
I just discovered your weblog and expected to give that I have really thoroughly enjoyed the experience of looking at your blog entries. Considering, I'll be buying your feed and I trust you structure again soon. http://www.bangaloreescortindia.co.in/
# Posted By Nikki Rastogi | 6/2/21 2:16 AM
Thanks for writing this simple and interesting Blog. It is very easy to understand. I am inspired and want to appreciate your efforts. I found a huge amount of content in this Blog which is very attractive and new for me as a regular reader. I loved it. Moreover, I liked the tips that you have shared in it. Please come up with new and exciting ideas as well as I can’t wait to read more exciting ideas from you.
# Posted By Sanzon | 8/6/21 7:17 PM

© 2021, Stephen J. Withington, Jr.  |  BlogCFC was created by Raymond Camden – Version 5.9.004

Creative Commons License  |  This work is licensed under a Creative Commons Attribution 3.0 Unported License.  |  Hosted by Hostek.com