About The Author
Michael Flynn is a Web Developer at Terralever, an interactive marketing agency based in Tempe, AZ. He specializes in web technologies that include C# .NET, SQL, XML, AJAX, jQuery, Flash, and also skills in Photoshop and Illustrator. He was been involved in web development since 1998, and earned a Bachelors and Masters degree in Computer Engineering and Computer Science from the Univerisity of Louisville and holds an MSCT certificate in Web Applications.
Calendar
<<  September 2010  >>
SMTWTFS
2930311234
567891011
12131415161718
19202122232425
262728293012
3456789

URL Rewriting In Joomla 1.5 on IIS 7

I recently completed a project that needed to have Joomla use SEO friendly URL's on IIS 7.  The main goal was to get this to work with Microsoft URL Rewrite Module for IIS 7.0 Go Live. Doing some research I could not find any tutorials on this, or if anyone had succeeded.  Joomla is PHP based and Apache friendly and I am a .NET Developer so I hope you felt my pain through this learning process.  Joomla has built in SEF (Search Engine Friendly) functionality but works flawlessly on Apache, IIS on the other hand it is a different story.  Joomla uses the htaccess file if the website resides on an Apache server.  IIS doesn't use the htaccess file and therefore can not get the desired results we want.

Joomla Configuration

 

Default Joomla URL


http://www.mydotnetworld.com/index.php?option=com_content&task=view&id=5&Itemid=1

This disadvantage of this url is it is long, hard to read to the human eye, and not search engine friendly, meaning it might never be indexed.

SEF Joomla URL (htaccess disabled)

http://www.mydotnetworld.com/index.php/content/view/5/6/

To enable this you can log into the admin and navigate to Site > Global Configuration.  On the right side you will see a area called "SEO Settings".  Turn "Search Engine Friendly Urls" to on. 

The disadvantage to this approach is it had index.php in the url.  I have read somewhere that it doesn't hurt search engine indexing, which may be true, but if you can fix that for user display it is a must.

SEF Joomla URL (htaccess enabled)

http://www.mydotnetworld.com/content/view/5/6/

If you want to remove the index.php from the URL and you are on Apache you may select the second option under "SEO Settings".  Ignore the warning by "Use Apache mod_rewrite" and turn it on.  I haven't tested this on Apache but it seems to remove the index.php mysteriously as I do not have much knowledge of PHP and how Joomla removes this.  IIS does not have the ability to read the htaccess file, and rewrite rules in it.

SEF Joomla URL with SH404SEF (htaccess enabled)

http://www.mydotnetworld.com/philosophy/marketing/web-strategy

I tried numerous plugins but could not get the desired result I wanted.  The one I finally got working was SH404SEF.  As you can see the above url is much cleaner and easier to read.  This result was accomplished from the above steps.  Yes, even turning on the htaccess option.  When installing this plugin make sure it is enabled.

The last step is to enable the actual rewriting of the page to the correct URL.  I copied the rules from the htaccess file provided by Joomla.  The bold one I could not import into IIS as it could not read the syntax, but works regardless of this rule.  So if anyone has a work around please add a comment.

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^/index.php
RewriteCond %{REQUEST_URI} (/|\.php|\.html|\.htm|\.feed|\.pdf|\.raw|/[^.]*)$  [NC]
RewriteRule (.*) index.php
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]


IIS 7 Configuration



I know there are ISASPI filter work around's available but I wanted to see if I could get this to work with the new plugin available for IIS, called Microsoft URL Rewrite Module for IIS 7.0 Go Live

You will need to install the Microsoft URL Rewrite Module for IIS 7.0 Go Live and FastCgi.  Go to your website directory in IIS and make sure you are in features view.  Double click the "URL Rewrite" icon under the IIS section.



Once in the url rewrite section there is an option to "Import rules..." on the sidebar.



Within the textbox that says "Rewrite rules", paste the rules from above that were taken from the htaccess file found in the Joomla base directory. Click apply.  IIS is now set to do URL rewriting for Joomla.



After much searching and reading this is the configuration I came up with to get Joomla to have SEO friendly URL's on IIS 7 and the Go Live Rewrite Module.

Posted on 10/24/2008 1:50:00 AM by cblaze22

Permalink | Comments (39) | Post RSSRSS comment feed |

Categories: Url Rewriting | Joomla | IIS

Tags: , ,

Currently rated 5.0 by 2 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5


Comments

November 27. 2008 10:42

Web Development Community

Trackback from Web Development Community

My DotNet World - URL Rewriting In Joomla 1.5 on IIS 7

Web Development Community

November 27. 2008 10:43

Webdevvote

You are voted at http://webdevvote.com!!
Track back: http://webdevvote.com/php/My_DotNet_World_URL_Rewriting_In_Joomla_1_5_on_IIS_7

Webdevvote us

December 10. 2008 03:45

manjiri

hi,
Am using Joomla 1.5.X.
I have enabled the setting in admin section, global configuration.
Enabled Search Engine Friendly URLs , Use Apache mod_rewrite & Add suffix to URLs on live site.
This setting works properly for articles & menus. I have added art form component for my site, the url is not human readable , url is dummy and after .net, the real problem
www.dummysite.net/component/artforms/?formid=1
the later part after .net/ , i want to replace that wit myform.html.
Can you help me in solving this problem.
Thanks in advance.

manjiri in

December 11. 2008 04:38

Yuan Bull

i also tried as you did,but i did not work.

Yuan Bull cn

December 25. 2008 21:40

Busby SEO Test

thank you for this post, it's really useful for me who still new in Joomla.

Busby SEO Test us

July 7. 2009 02:17

Graeme

Hi,

Good article.

I am running IIS7.5, and my URL rewrite does not have an import function, and I am having a hard time defining the rules.

G

Graeme sa

July 7. 2009 02:39

Graeme

Hi,

This is the quickest.

Create or edit your global.config file:

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="Security Rule" stopProcessing="true">
<match url="^(.*)$" ignoreCase="false" />
<conditions logicalGrouping="MatchAny">
<add input="{QUERY_STRING}" pattern="mosConfig_[a-zA-Z_]{1,21}(=|\%3D)" ignoreCase="false" />
<add input="{QUERY_STRING}" pattern="base64_encode.*\(.*\)" ignoreCase="false" />
<add input="{QUERY_STRING}" pattern="(\&lt;|%3C).*script.*(\>|%3E)" />
<add input="{QUERY_STRING}" pattern="GLOBALS(=|\[|\%[0-9A-Z]{0,2})" ignoreCase="false" />
<add input="{QUERY_STRING}" pattern="_REQUEST(=|\[|\%[0-9A-Z]{0,2})" ignoreCase="false" />
</conditions>
<action type="CustomResponse" url="index.php" statusCode="403" statusReason="Forbidden" statusDescription="Forbidden" />
</rule>
<rule name="SEO Rule">
<match url="(.*)" ignoreCase="false" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" pattern="" ignoreCase="false" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" pattern="" ignoreCase="false" />
<add input="{URL}" negate="true" pattern="^/index.php" ignoreCase="false" />
<add input="{URL}" pattern="(/|\.php|\.html|\.htm|\.feed|\.pdf|\.raw|/[^.]*)$" />
</conditions>
<action type="Rewrite" url="index.php" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>

In Joomla Admin set:

SEO Url's : Yes
Apache Mod Rewrite: Yes
Add suffix : No

That's it !

Graeme

Graeme za

August 6. 2009 21:20

Internet marketing

Hi,
Posts that share links with visitors, such as your most popular articles over the past month help provide a resource to your readers, while still encouraging them to visit additional posts.

Internet marketing us

August 28. 2009 22:33

Fil

Hi Graeme

I have copied the code you provided, created new file global.config , uploaded the file in root folder of Joomla installation directory. Still it is not working.
The urls are changed but it says " the page cannot be found"

Can you give some hints?

Regards
Fil

Fil us

September 10. 2009 08:59

Craig

I get a 404 when I use this as my config file and turn on the settings for IIS 7 and Joomla 1.5.

==========
You may not be able to visit this page because of:

an out-of-date bookmark/favourite
a search engine that has an out-of-date listing for this site
a mistyped address
you have no access to this page
The requested resource was not found.
An error has occurred while processing your request.
Please try one of the following pages:

Home Page
If difficulties persist, please contact the System Administrator of this site.
==========

Craig us

September 14. 2009 09:42

seed

I tried this Graeme and it worked all except for when I go to my http://www.MyDomains.com/

If i use http://www.MyDomains.com/index.php it loads and then every other link works too but for some reason the root doesn't work.

seed us

September 14. 2009 12:31

seed

Why are my comments removed each time I post.. LAME!

seed us

October 29. 2009 05:21

vincenzo

sorry , where can i find global.config file ?

vincenzo it

October 29. 2009 05:28

vincenzo

sorry where can i find global.config file

vincenzo it

November 1. 2009 21:46

Broadband

PHP originally stood for personal home page.[4] It began in 1994 as a set of Common Gateway Interface binaries written in the C programming language by the Danish/Greenlandic programmer Rasmus Lerdorf.[7][8] Lerdorf initially created these Personal Home Page Tools to replace a small set of Perl scripts he had been using to maintain his personal homepage. The tools were used to perform tasks such as displaying his résumé and recording how much traffic his page was receiving.[4] He combined these binaries with his Form Interpreter to create PHP/FI, which had more functionality. PHP/FI included a larger implementation for the C programming language and could communicate with databases, enabling the building of simple, dynamic web applications. Lerdorf released PHP publicly on June 8, 1995 to accelerate bug location and improve the code.[9] This release was named PHP version 2 and already had the basic functionality that PHP has today. This included Perl-like variables, form handling, and the ability to embed HTML. The syntax was similar to Perl but was more limited, simpler, and less consistent.[4]

Broadband in

November 4. 2009 14:54

SEO Reseller

I am looking for reputable company that provide SEO and Internet marketing services on google search?

SEO Reseller us

November 4. 2009 18:03

liemoffline

I have a Joomla 1.5.14 website , that running on IIS 6, I already installed Microsoft URL Rewrite Module but I don't know how to configure URL Rewrite on IIS 6 to work with Joomla 1.5. Please help! Thank you in advance!

liemoffline

December 2. 2009 23:22

hirephpdevelopers

Here find out good information methods for url rewriting. Author try best for How to Url rewrite by using Microsoft IIS tool.Also given idea about Microsoft URL Rewrite Module for IIS 7.0 Go Live. By using this tool makes web development url rewriting easier.This article give innovative idea about url rewriting.

hirephpdevelopers us

January 30. 2010 10:06

business opportunity

Excellent blog post, I look forward to reading more.

http://www.mapofsuccess.com/

business opportunity gb

February 12. 2010 14:24

Kalpana

yes joomla is seo friendly so you can create your website more dynamic with the help of Joomla.

Kalpana in

March 24. 2010 02:30

how to download from redtube

I came across your site, i think your blog is awsome, keep us posting.

how to download from redtube

March 25. 2010 14:57

tabletki na trądzik

I like your blog design. What template did you use ?

tabletki na trądzik

March 29. 2010 12:55

Los Angeles Search Engine Optimization

I have enabled the setting in admin section, global configuration.
Enabled Search Engine Friendly URLs , Use Apache mod_rewrite & Add suffix to URLs on live site.
This setting works properly for articles & menus. I have added art form component for my site, the url is not human readable , url is dummy and after .net, the real problem

Los Angeles Search Engine Optimization us

April 4. 2010 09:41

Search Engine Optimization Service

you for this post, it's really useful for me who still new in Joomla.

Search Engine Optimization Service us

April 11. 2010 07:48

Yunus Emre YÜCE

thanks , its right solution for me on Win2008 32bit And IIS7

Yunus Emre YÜCE tr

April 14. 2010 13:44

Seo uk

Interesting post

Seo uk at

April 17. 2010 14:58

gry planszowe

I searched many websites and here i found what i was looking for, thanks for valuable post

gry planszowe us

April 21. 2010 10:03

make money online

I searched many websites and here i found what i was looking for, thanks for valuable article

make money online us

April 22. 2010 07:19

unlock iPhone

I want to subscribe to your site, do you have newsletter ?

unlock iPhone us

April 23. 2010 04:27

Los Angeles Search Engine Optimization

I have enabled the setting in admin section, global configuration.
Enabled Search Engine Friendly URLs , Use Apache mod_rewrite & Add suffix to URLs on live site.

Los Angeles Search Engine Optimization us

April 24. 2010 11:59

teeth bleaching

I need to tell you that you are a good writer. Awsome articles

teeth bleaching us

April 27. 2010 04:08

how to download from youtube

Good work, keep us posting, you are good writer.

how to download from youtube us

April 28. 2010 10:56

no deposit bingo

Interesting post i totally agree with the other comments. Keep writing

no deposit bingo us

April 30. 2010 11:18

job at home

I like design of your website What is the name of template ?

job at home us

May 9. 2010 03:21

seks randki

I want to make my first blog, do you think that wordpress cms is good ?

seks randki us

May 21. 2010 04:05

serwis motocykli Gdańsk

Great info, thanks for useful post. I am waiting for more

serwis motocykli Gdańsk us

June 2. 2010 09:44

Driving Games

it's really useful for me who still new in Joomla.

Driving Games us

June 2. 2010 16:53

Driving Games

the later part after .net/ , i want to replace that wit myform.html.
Can you help me in solving this problem.
Thanks in advance.

Driving Games us

June 21. 2010 19:56

web design new york

Useful info. Hope to see more good posts in the future.

web design new york us

Add A Comment




  Country flag