I am new to sitecore, all my url to the pages in my project looks like the following
http://domain/Inventory/Pages/AboutUs.aspx
http://domain/Inventory/Pages/ContactUs.aspx
Here i need to convert all the url's to the following format
http://domain/AboutUs.aspx
http://domain/ContactUs.aspx
Here is my Content tree structure
+Content
+Inventory
+Pages
AboutUs
ContactUs
Home
Inventory and Pages are directories, these directories should not appear in my browser url
Please help me in this.
If I understand you correctly, you don't need to do any URL rewriting, just configure the start item in Sitecore.
In the web.config file you will see a section called <sites>
with a node called <site name="website"..
this node has an attribute called startItem
. Change it's value from the default to /Inventory/Pages
. Note that with this setup and your current content tree you would have hostname/home
and hostname/AboutUs
. If you went to hostname/
you would be browsing the 'Pages' item which might not be what you intend? It would be more conventional to have a structure such as
+Sitecore
+Content
+Inventory
+Home
+AboutUs
+ContactUs
You can set root path and start path of your site in SiteDefination.config file under app_Config\\Include. You don't need to reset content tree structure.
rootPath="/sitecore/content/Inventory"
startItem="/Pages"
please make sure to enable SiteDeffination.config if this is disable
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.