More in this section
Forums / General Discussions / URL rewrite

URL rewrite

The forums are in read-only mode. In case that you want to directly contact the Progress Sitefinity team use the support center. In our Google Plus group you can find more than one thousand Sitefinity developers discussing different topics. For the Stack Overflow threads don’t forget to use the “Sitefinity” tag.
4 posts, 0 answered
  1. Matthew
    Matthew avatar
    7 posts
    Registered:
    30 Sep 2010
    21 Jan 2011
    Link to this post
    Hello,

    How could I go about removing the .aspx extension?

    A client wants her website's audience to be able to navigate to certain pages in address bars without having to type the .aspx.

    Is there a rewrite rule I could implement with Sitefinity?

    Say if a user entered www.thissite.com/this

    it would forward to: www.thissite.com/this.aspx

    Thanks
  2. Matthew
    Matthew avatar
    7 posts
    Registered:
    30 Sep 2010
    21 Jan 2011
    Link to this post
    I just wanted to add that I've tried this in Page Properties.

    The generated URL would be: 

    ~/thispage.aspx

    I can't put ~/thispage 

    It says all URLs should be unique. So I try:

    ~/thispagepage

    And when I try navigating to it - I get page not found, resource not found, etc.

    Any help is appreciated.

    EDIT: I've tried changing the pageExtension in the web.config to "", but it just says page not found. It worked on my localhost, but not on the server.
  3. Matthew
    Matthew avatar
    7 posts
    Registered:
    30 Sep 2010
    21 Jan 2011
    Link to this post
    Well, the server is running IIS 7 and my local machine is running IIS 7.5. So is a rewrite rule my only option?
  4. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    26 Jan 2011
    Link to this post
    Hello Matthew,

    Thank you for using our services.

    If you are running a .NET 3.5 version of Sitefinity bellow is what you have to do to remove the extension.

    1) Edit the web.config file, in <cms> configuration section set the pageExtension property to empty string:
         <cms defaultProvider="Sitefinity" pageExtension="" additionalExtensions=".html"
    licenseFile="~/App_Data/LicenseFile.xml" siteTemplate="" projectName="Sitefinity37SP3"
    disabled="false" pageEditorUIMode="Overlay">

    in system.webServer/modules configuration section make the bellow edit:
    <modules runAllManagedModulesForAllRequests="true">

    2) Open your IIS manager and go to your website configuration screen. Go to HttpHandlers mapping and add a wildcard script map to the aspnet_isapi.dll.

    If you are running ASP.NET 4.0 and .NET 4.0 version of Sitefinity 3.7 SP4 you do not need to add a wildcard script map as .NET 4.0 has a built in extensionsless urls handler.

    Greetings,
    Radoslav Georgiev
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Register for webinar
4 posts, 0 answered