Products » Knowledge Base » Url Master 

Url Master Help Wiki

Creating a Url with no aspx extension on your DNN

A common scenario with DNN sites is the need to create one or two simple urls with no page extension.  These are generally required for requests for a simple url for marketing purposes : having something ending in .aspx on the side of a bus can look a bit silly (and is a waste of money to print extra characters that aren't necessary).   The standard DNN Url Rewriter can't help you out in this instance, the use of the .aspx extension is well embedded witihin the logic of the standard provider.

The Url Master module can switch your entire site over to having no page extensions (like this site) but it can also handle one-off pages which have no page extension as well.  This functionality is built-in, and you don't have to switch on any options in the Url Master module, though you do need to tell IIS that you want pages with no extension possible.

Enabling no-extension pages in IIS

IIS and ASP.NET can handle requests with no extension, but to do so, you will have to map the 'wildcard' extension to the ASP.NET runtime.  Wildcard is simply the old DOS name for the * character - so called because doing a DOS command with the * character would match everything.  For example, c:> dir *.* would list out the contents of all matching files in the C: directory.

Please see how to enable ASP.NET and wildcard extensions at the following Knowledge Base article : Switching off page extensions in IIS

Once you have configured your IIS settings to run without extensions, and you have enabled the Url Master module on your site, then any of the Url Master urls will work without further changes.  For example, if you have a page on your site with a Url of , then this url will start working immediately : - you don't have to change anything in order for this to work.  With the 'automatically 301 redirect unfriendly urls' option switched on, this Url should automatically redirect back to the /test-page.aspx version.  The reason this works is because within the logic of the Url Master module, page extensions are largely ignored.  As long as the request gets passed to ASP.NET, and thus DNN, and thus Url Master, it can work out which page you mean by the Url.

However, the more common scenario is creation of a customised Url to either point to an existing page or new page.  Generaly, it's a good idea to set these custom Urls up as a redirect so that you don't run into any duplicate content problems.    This is easily done by going to the 'Admin->Page Urls' page.  Select the page you'd like to redirect to, and click on 'add new url'.  A new url will be added to the bottom of the list.  Just type in your new Url (ie /special-offer).  You don't need to add a trailing slash (don't put on /) or .aspx, or anything.  Just type in the Url you'd like.  Then, select '301 redirect' as the status for that page, and apply the changes.   If you don't want to redirect the page, just select '200' as the status, and the page will show as normal with the selected Url.

After completing that, test out your new Url.  You should be able to request your new Url (without the extension) and have it show the correct page on your site.


 |  View Topic History  |