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

Forums / General Discussions / Adding Aditional URLS

Adding Aditional URLS

7 posts, 0 answered
  1. Sharon
    Sharon avatar
    28 posts
    Registered:
    29 Jul 2008
    18 Mar 2009
    Link to this post
    I found great directions for adding additional URLs in Gabe's "Easy URL Management in Sitefinity " post on Sitefinity Watch.

    The problem I'm running into though is how to add an old link that was like this:

    http://www.mysite/consumer/

    The URL name box seems to really want an actual page name. When I put in the link above I get an error message to enter a valid URL. I could add the page name to the URL but then it wouldn't match the old links that are floating around.

    I can't be the only one who has to do this. How did you get it to work?

    Thanks!
    Sharon
  2. Georgi
    Georgi avatar
    3583 posts
    Registered:
    28 Oct 2016
    19 Mar 2009
    Link to this post
    Hello Sharon,

    You get the error because you specify a static url. Please try adding a dynamic (starting with ~/). Sitefinity will automatically handle the domain name for you.

    Greetings,
    Georgi
    the Telerik team


    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. Sharon
    Sharon avatar
    28 posts
    Registered:
    29 Jul 2008
    19 Mar 2009
    Link to this post

    Sorry, too many late nights in a row, I wasn't clear.

    We have an existing site that's been around for over a decade. There are links that come into it that land all over the place.

    I'm still going to have to use a lot of pages out of the old site for the time being.

    Once we go live, the new site will be:
    www.mysite.org

    the old site will be
    http://old.mysite.org

    What I need to handle is if  someone outside does a link like:

    www.mysite.org/staff/ and I want that link to now go to my "Contact Us" page.

    When I go to put the additional URL on the contact us page, it won't let me enter http://www.mysite.org/staff/ .

    How do I handle this situation?

  4. Sharon
    Sharon avatar
    28 posts
    Registered:
    29 Jul 2008
    19 Mar 2009
    Link to this post
    While I'm at it. Is there any easy way to take any incoming page request that causes a "Page Not Found" and redirect it from www.mysite.org to http://old.mysite.org ?

    Thanks!
  5. Ivan
    Ivan avatar
    478 posts
    Registered:
    16 Jun 2015
    20 Mar 2009
    Link to this post
    Hello Sharon,

    there is a rather simple way for achieving this. Namely, you should add the additional URLs with extension (e.g. staff.aspx), but then you should apply one of the techniques for working with extensionless urls in Sitefinity. By doing so, your page will be accessible both by "staff.aspx" and just "staff". You can find more about extensionless URLs in our User Manual on page 285 which explains 404 page approach and wildcard mapping approach.

    I hope you'll find this information helpful. Let us know if there is anything else we can do for you.

    Greetings,
    Ivan
    the Telerik team


    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  6. Sharon
    Sharon avatar
    28 posts
    Registered:
    29 Jul 2008
    20 Mar 2009
    Link to this post
    I did look at the User guide and am mapping some of my urls over. However, that only solves part of my problem.

    Here's the whole scenario:
    Old website - accessible as either www.mysite.org (for now) or http://old.mysite.org
    ------------
    On old webserver - Web1
    Running Server 2003
    IIS6
    SQL Server 2005
    Created in a combination of html, coldfusion, java scripts

    New website - accessible as http://new.mysite.org (will become www.mysite.org very soon
    --------------
    On new webserver - Web12
    Running Server 2008
    IIS7 in IIS6 compatability mode
    SQL Server 2008
    Sitefinity site

    Problem 1:
    original bookmark: www.mysite.org/staff or www.mysite.org/staff/index.cfm
    new Sitefinity page: ~/AboutUs/ContactUs.aspx
    Added Additional URL ~/staff/index.cfm
    The browser doesn't find the page if I do http://new.mysite.org/staff or http://new.mysite.org/staff/index.cfm

    Problem 2:
    We have existing links like:
    http://www.mysite.org/pages/memberpage.cfm?id=101 (this is a member profile page that is auto-generated out of our old database software that we will be replacing in a few months time) - I have 580 pages of this page alone (only the ID number changes).
    I need a way to tell Sitefinity that if any page ending in .htm, .html, .cfm comes in that the URL should really be http://old.mysite.org instead of www.mysite.org and get the request to the right server.

    Problem 3:
    Relates to problem 2, we have a lot of existing links to our site all over the internet. If I google on our website address, I get over 16,000 hits. Here is an actual link from about.com with only my website name changed:
    http://www.mysite.org/courses/index.cfm?fuseaction=get_coursesbydisc&id=G
    I need to trap this somehow and send it to http://old.mysite.org instead until we replace the back end software.

    How do I fix problem 1? Can I use the AdvancedUrlRewriter to reroute anything ending in .htm / .cfm to the right webserver/website?

    Thanks for any/all help.

    Sharon
  7. Ivan
    Ivan avatar
    478 posts
    Registered:
    16 Jun 2015
    25 Mar 2009
    Link to this post
    Hi Sharon,

    ok I think I have found the solution to all three of your problems. Sorry for the delay with the ticket:

    Problem 1:

    accessing the www.mysite.org/staff/index.cfm
    a) open your web.config file and add additional page extension (.cfm). This property is part of the cms element. Here is how should <cms> element look after the modification:
    <cms defaultProvider="Sitefinity" pageExtension=".aspx" disabled="false" 
          pageEditorUIMode="Overlay" additionalExtensions=".cfm"

    Make sure you map the .cfm extension to ASP.NET engine. If you are unsure how to do this you can find instructions in our user manual on page 277 (Configuring IIS) - it's same as for .sflb ili .template extension, except that you will do it for the .cfm extension.

    b) accessing extensionless www.mysite.org/staff

    Now, you see, you've added additional url like this "
    ~/staff/index.cfm". Extensionless access will be enabled to "/staff/index". What you should do is add additional url as this "~/staff.aspx", so that when extension is removed you can access it with www.mysite.org/staff

    Problem 2:
    I suggest you set up advanced url rewriter for this purpose as explained on the page 257 of our User Manual (URL Rewriting section). Our technical evangelist Gabe Summner also has a pretty good webinar on URL rewriting in Sitefinity that you may wish to check out.

    Problem 3:
    Regarding your problem 3 I would also suggest you use url rewriting. Another option, of course, is to write your own http handler where you can implement any business logic that comes to your mind (e.g. if request path ends with .chm and has a query string do this, if it doesn't do query string, if none - let Sitefinity handle the request). We have a pretty short and straightforward KB on this approach.

    I hope you will find this information helpful. Let us know if there is anything else we can do for you.

    Regards,
    Ivan
    the Telerik team

    Check out Telerik Trainer , the state of the art learning tool for Telerik products.
Register for webinar
7 posts, 0 answered