Enabling search engine friendly URLs within InstantKB.NET


By default InstantKB.NET provides basic URL rewritting to remove the need for querystring parameters within URL's, providing cleaner, more compact addresses to content within your knowledgebase.

For example the basic URL rewritting will allow you to access articles using a URL similar to...

http://kb.instantasp.co.uk/KnowledgebaseArticle11733.aspx

InstantKB.NET will convert this URL at runtime to...

http://kb.instantasp.co.uk/KnowledgebaseArticle.aspx?ArticleID=11733

Althrough the basic URL rewritting is helpful InstantKB.NET also supports a more advanced method of URL reiwritting supporting virtual paths and allowing content titles and keywords within your URLs.

Once you enable &configure search engine friendly URLs within InstantKB.NET links to pages, articles and content within your knowledgebase will no longer require a .aspx extension. For example you could access the same article shown above using the following URL...

http://kb.instantasp.co.uk/Documentation/Enabling-search-engine-friendly-URLs-within-InstantKB.NET

With search engine friendly URLs enabled accessing other content also becomes much more natural. For example...

http://kb.instantasp.co.uk/Search.aspx becomes http://kb.instantasp.co.uk/search/

Or

http://kb.instantasp.co.uk/Tags.aspx?Tag=InstantKB.NET becomes http://kb.instantasp.co.uk/Tags/InstantKB.NET

The Search Engine Friendly URL feature when enabled provide a much cleaner, more guessable URLs to content within your knowledgebase. It also has the advantage of improving search engine placement for your content. 

ontent is often ranked higher is keywords appear both on the page and within the URL.

Enabling Search Engine Friendly URLs

There are two key steps to enabling search engine friendly URLs. The first is to add the wildcard application mapping to IIS. Then you'll need to enable two setting options within IstantKB.NET.

1. Configuring IIS

The first step is to setup a new wildcard application mapping within Internet Information Services (IIS). This will require direct access to your web server & IIS configuration. As content no longer requires the .aspx extension with search engine friendly URLs enabled you need to modify IIS to ensure all requests go through the aspnet_isapi.dll. This allows InstantKB.NET to still perform URL rewritting when accessing content without a .aspx file extension.

- IIS 5 (Windows XP)

1. Open Internet Information Services.
2. Right click the web site InstantKB.NET is installed within and click properties.
3. Within the properties dialog click the "Home Directory" tab. Then click the "Configuration" button.

You will see the following dialog once you click the configuration button...



4. Click the "Add" button to create a new custom application mapping. You should add a new wildcard application mapping as shown below..



For the executable path you should select the C:\windows\Microsoft.NET\Framework\2.0.50727\aspnet_isapi.dll. Provide all other information as shown in the above screen grab. Please ensure "Check that file exists is not checked.

- IIS6 (Windows Server 2003)

It's a little easier with IIS6 to add wildcard application mappings.

1. Open Internet Information Services.
2. Right click the web site InstantKB.NET is installed within and click properties.
3. Within the properties dialog click the "Home Directory" tab. Then click the "Configuration" button.

You will see the following dialog once you click the configuration button...



4. Click the "insert" button. You will see the dialog displayed below...



Within this dialog simply select C:\windows\Microsoft.NET\Framework\2.0.50727\aspnet_isapi.dll for the executable.

Ensure "Verify that file exists" is not checked.

- IIS6 (Windows Vista)

The process differes again for users running Vista & IIS6.

1. Open Internet Information Services
2. Locate and select the InstantKB.NET web application within IIS.
3. Within the main content pane select the "Handler Mappings" option.
4. Within the actions pane on the right select "Add Script Map".

Complete the information within the add new script map dialog as shown below...



6. Click the "Request Restrictions" button and ensure the dialogs appear as below...





2. Configuring InstantKB.NET

Once you've added a wildcard application mapping to IIS you will need to enable two options within InstantKB.NET to take advantage of this feature. Todo this you will need to login and the administrator and visit your Admin CP.

From within the "Admin CP" click the "Settings" link and click "Knowledgebase". Within the knowledgebase settings you will need to enable the following options...

- Use Search Engine Friendly URL's
- Use content titles within URLs

You should set both these options to "yes" as shown in this screengrab.

Testing the feature is enabled and working correctly

Once you've made the changes to both IIS and InstantKB.NET the quickest way to test everything is working correctly is to simply visit your knowledgebase within a browser. You'll notice the URLs now include article titles and look similar to directory structures as opposed to .aspx files. All your previous links will of course continue to work with this option enabled.

If you have any questions please don't hesitate to post a comment below or contact us.