1-888-365-2779
+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Url rewriting for custom module, using two metafields

Url rewriting for custom module, using two metafields

3 posts, 0 answered
  1. Nadya
    Nadya avatar
    52 posts
    Registered:
    17 Dec 2008
    23 Feb 2010
    Link to this post
    Hello Telerik team,
    I am developing a Sitefinity 3.7 SP 2 website and I have Employees module there. I need the url rewriting for details page to look like this :

    http://mysite/Employees/John_Smith.aspx

    so I add to my web.config:

    <!-- custom modules -->
        <employees defaultGenericProvider="Employees">
            <genericContentProviders>
              <add providerName="Employees" urlRewriteFormat="[Name]_[LastName].aspx" urlDateTimeFormat="yy-MM-dd" urlWhitespaceChar="_"/>
            </genericContentProviders>
        </employees>
    and in providers :

    <add name="Employees" urlRewriteFormat="[Name]_[LastName].aspx" urlWhitespaceChar="_" visible="False" defaultMetaField="Name" securityProviderName="" allowVersioning="True" allowLocalization="True" applicationName="/Employees" versioningProviderName="" commentsModeration="true" connectionStringName="GenericContentConnection" type="Telerik.Cms.Engine.Data.Providers.DefaultProvider, Telerik.Cms.Engine.Data"/>

    but I still get 

    http://mysite/Employees/John.aspx

    Can you please help?

    Thanks and all best,
     Nadya
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    23 Feb 2010
    Link to this post
    Hello Nadya,

    The settings seems to be ok. Check whether you have set values for Name and LastName. If you create a new item does the url format is correct? Most probably the urlRewriteFormat is not updated for the old content items only.

    Regards,
    Ivan Dimitrov
    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.
  3. Nadya
    Nadya avatar
    52 posts
    Registered:
    17 Dec 2008
    23 Feb 2010
    Link to this post
    Hello Ivan,
    you are right - it seems that it remembers the initial url. All new items I am creating are with correct rewriting.

    Thanks and have a great week, 
    Nadya
Register for webinar
3 posts, 0 answered