Technical support This forum is closed.
Version 1.x > Technical support > Friendly URLs, the root document, and Excluded Directories View modes: 
User avatar
Member
Member
trint99 - 9/5/2006 11:29:52 PM
   
Friendly URLs, the root document, and Excluded Directories
Our organization decided to implement our site using friendly URLs with no extension. (ex. http://mysite.com/Products/ instead of http://mysite.com/Products.aspx) This was after I had already created some documents in a localhost installation. It took me a while to figure it out, but I found that if I checked out the existing documents, checked them back in and published them, Kentico created the new directories with the dummy default files and the pages viewed as expected.

Then I discovered that when I searched for a file, the search results were not linking to the files correctly. I added the Kentico tutorial pdf file to a /Documents/ folder. The search tool did find the pdf file, but the link it returned was http://localhost/Website/Documents/KenticoCMS_Tutorial_2005_pdf. Clicking on this link gives a 404 error.

I added /Documents to the CMSExcludedDirectories entry in web.config, but the problem remains.

Next, I discovered that going to the site root no longer goes to my home page. Where before http://localhost/Website/ would display my /Home page, it now goes to the default.aspx dummy file in the root directory. If I change CMSFriendlyURLStyle back to ".aspx", the /Home page displays correctly. I can't find a way to make http://localhost/Website/ display the /Home page.

Here are my current settings:
<add key="CMSWebApplicationVirtualPath" value="/Website"/>
<add key="CMSFriendlyURLStyle" value=""/>
<add key="CMSGenerateFriendlyUrlFiles" value="true" />
<add key="CMSExcludedDirectories" value="/Documents"/>

And my /Home page:
Type: Page (Menu Item)
Order: 0
ID Path: /9
Alias Path: /Home
Name Path: /Home

User avatar
Guest
admin - 9/7/2006 4:50:46 PM
   
Re: Friendly URLs, the root document, and Excluded Directories
Hello,

Thank you for your post. Please find my comments below.

1) Search results
- you may need to set up the CMSSearchResults control like this:

- Path: /%
- Path Type: IDPath
- Target URL: ~/SearchResultRedirect.aspx?idpath=
- CMSSearchDialogID: CMSSearchDialog1
- UseFriendlyUrls: false

2) The system always expects that your home page is implementing using the default.aspx page template under the root.

Best Regards,

User avatar
Member
Member
trint99 - 9/13/2006 5:04:44 PM
   
Re: Friendly URLs, the root document, and Excluded Directories
Setting UseFriendlyUrls to false on the control does fix the problem with the linked documents and search results to other pages in the site still render with their correct, friendly URLs.

Thanks!