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

Forums / Developing with Sitefinity / Changin the URL extension

Changin the URL extension

4 posts, 0 answered
  1. Paul
    Paul avatar
    5 posts
    Registered:
    16 Jun 2008
    15 Jul 2008
    Link to this post
    Hi,
    I am retro fitting an existing HTML site to sitefinity.  It is a small site but we ran into trouble where the person responsible for the site had to call on the developer for some of the easiest stuff, like adding a new page and menu item.  It would be much nicer to be able to add pages and automatically have it added to the menu.  It was really slick and easy to set everything up real quickly and easily. 

    I ran into one issue.  The original site has a Flash Splash screen.  index.html is called which plays the flash (with a skip intro button) when the flash finishes there is a button to enter the site.  Rather than creating a new template and working with the alighment I figured I would just leave index.html as the default then link to home.aspx when done.  The original home page was home.html so I wanted to use the url rewriter to access this with home.html.

    I was working to assign a different url for this.  I may have messed up and not saved at the proper time or something, but it finally ended up with a big red warning stating that optional urls must be unique.

    I can not find anything using home.html as a url.

    I was able to work around by creating home.html in the folder and using iis to redirect the to home.aspx.

    This works but I would like to know if home.html is reserved or if there is a table of redirected urls that may be out of sync.  Things are working now but I would like to resolve this issue.

    Thanks in advanced.

    Paul
  2. Joe
    Joe avatar
    138 posts
    Registered:
    24 Sep 2012
    16 Jul 2008
    Link to this post
    Hi Paul,

    Thanks for contacting us.

    Since Sitefinity stores all of its pages inside of the database and the site is blank when it is first installed, Sitefinity does not have a home.html page created out of the box. In your project, you have a file called home.html and when you use the URL rewriter to make another page called home.html, you can that unique error because home.html already exists in your project.

    Based on your input, you'd want to link to an external page rather than using the URL rewriter because you already have a page that is made. To link to an external page, follow these instructions:
    1. Login to the CMS and click on the Pages tab
    2. Create a new page
    3. On the properties tab of the page and click External Page under Page Type
    4. Fill in your external page's name and location
    The attached screenshot will give you more details on how this is done. The URL Rewiriter would be used if you already had a page made, such as ~/products/lights/lightblubs.aspx and you wanted to shorten the URL to ~/lights.aspx. The rewriter is also used for SEO purposes because the human readable URLs are searchable. Essentially, these alternate URLs make a page easier to find and search on the internet.

    I hope that I have clearly answered your question regarding the URL rewriter. Feel free to contact us if you have any other questions.
    Best wishes,
    Joe

    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. Paul
    Paul avatar
    5 posts
    Registered:
    16 Jun 2008
    16 Jul 2008
    Link to this post
    Thanks for your reply.

    I think the problems is the home.html was saved in the database but it is not active in the administor interface.

    Again what I want to do is make an alternate url home.html that redirects to home.aspx.  I have done this in IIS but sitefinity will not allows me to do this.  It says this is not unique so there is probably an abandoned record in the database.

    Paul
  4. Joe
    Joe avatar
    138 posts
    Registered:
    24 Sep 2012
    17 Jul 2008
    Link to this post
    Hi Paul,

    Thanks for following up.

    I now understand more clearly why you received that error. I was able to duplicate it by following these steps:
    1. In Visual Studio, I created a page called home.html and I saved it as ~/home.html (the root of the website)
    2. I created a page called home.aspx and I added some content into it using Sitefinity
    3. I published that page
    4. I used the URL rewriter on that page to link to home.html as an alternate URL. I checked the box that said "Redirect to the default URL."
    You received that error because home.html already exists in the root of your application. Your workaround worked because ~/home.html did not exist in the root, but it did exist in ~[foldername]/home.html. Essentially, the URL Rewriter takes a URL and just directs you to a page in the application. If you ask Sitefinity to create an alternate URL that already exists in your application, then you will get that unique page error.

    To achieve your desired results, you would want to make a page called home.aspx and create an external page linking to home.html. External pages, such as HTML pages, are not stored in the database. These pages are saved as files.

    The attached screenshot will give you instructions on making a page called home.aspx as an external page and linking it to home.html. I was able to duplicate that unique error by following these steps:

    I hope that my instructions help you implement your desired functionality. Feel free to contact us if you have any questions.
    Best wishes,

    Joe
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
Register for webinar
4 posts, 0 answered