Url Mapping Issue
Hey guys,
I'm attempting to use the url mapping for the pages I would have created. However it seems that I can't have a query strings in them. So i can't have e.g. "www.google.com/test.aspx. I keep getting this error One or more of the specified additional URLs are invalid.
I'm not sure what to do simply because most, if not all of my pages that I'd like to map have id's in them. If possible can someone advise me as to how this can be rectified. Thanks guys!
Hello Jesster,
Are you trying to simulate redirects based on a legacy sitemap or to use the navigation control to show links to external pages?
All the best,
Pavel
the Telerik team
We are trying to simulate redirects based on a legacy site that used a page named 'redir.aspx'. I created a page in Sitefinity named redir, but I am not allowed to put the alternate URL of 'redir.aspx' in the alternate url field - tells me invalid. How can I do this? I don't want to have to change every page that has this link on it...
Hello Jeremy,
Pages extensions are not supported by Sitefinity 4.x. There are 2 solutions - one is to use a url rewriter like urlrewriter.net or the other is through coding. Yet the 2nd option is in development (available only in 4.3) and I'd suggest using of a url rewriting module.
Greetings,
Pavel Iliev
the Telerik team
Hi Pavel,
Back before the 4.2.1733 release you could put extension with a URL in the Additional URLs box.
I know because I have several pages set up like this already and they were redirecting fine. Now unfortunately they are not redirecting.
So what is in the 4.3 release that you mentioned as the 2nd option?
Hello Jerome,
The way you can do is this:
App.WorkWith().Pages().LocatedIn(Fluent.Pages.PageLocation.Frontend).ForEach(p => p.Extension = ".aspx").SaveChanges();
This code will set the .aspx extension to all your pages. Please, have in mind that this is for internal use . It will be safer if you backup your database
Regards,
Pavel Iliev
the Telerik team