php - How to build sitemap with session parameters -
i want build sitemap site have problem on how write url in every url in site add number (auto incremental number).
for example site: www.example.com
when user enter site id, a: www.example.com/?i=1 , when enter inner page same parameter, such as: www.example.com/result/?i=1
but when other user enter site i=2, , etc ...
how can build sitemap ?
thank you
for urls have parameters, can use preservedrouteparameters force value parameters match. allows use querystring , route parameters in urls don't pertain page.
<mvcsitemapnode title="some page" controller="home" action="about" preservedrouteparameters="id"/>
this make node match each of following urls.
- http://www.example.com/home/about
- http://www.example.com/home/about/?id=1
- http://www.example.com/home/about/?id=12345
do note typically desirable in cases "id" has nothing identifying page. page (or record) identifiers, should create node every "id" using dynamic node provider or implementing isitemapnodeprovider.
see this answer more information.
Comments
Post a Comment