| Author | Messages | |
Déclic Vidéo
 Posts:57


| | 04/21/2007 3:46 AM |
| Hello, I am using Ventrian Friendly URL which works perfectly, excepted for hyphen.
If I have a pagename: Keyword1-Keyword2, the rewritten url is: Keyword1Keyword2.aspx
(the hyphen "-" is lost).
Same with a sub menu:
Menu: Keyword1-Keyword2
SubMenu: Keyword3
The url is rewritten: /Keyword1Keyword2/Keyword3.aspx (the hyphen "-" is lost).
Consequently, I thought that I could you use Page Blaster (V2.1.1) to achive my goal, i.e.
I would like the following url : /Keyword1-Keyword2/Keyword3.aspx (the hyphen "-" must stay). I have tried several solution with Page Blaster, but the only one which works is the following:
Portal Rules
Search For Keyword1Keyword2.aspx and replace with Keyword1-Keyword2.aspx
I must also go into Host Settings / Advanced Settings / Friendly URL Settings
Match .*/Keyword1-Keyword2/Keyword3.aspx Replace with ~/Default.aspx?TabId=xx
I find this solution a little bit "heavy" since I have few pages to rename...
Is there any other solution ???
I have tried Virtual Path (for an unknown reason it does not work).
I have tried to include the "Host Settings / Advanced Settings / Friendly URL Settings" into the replacement, but it does not work neither (I have tried to modify the order, without success).
I also see another solution: having my page named like that: Keyword1_Keyword2 (with an underscore "_"). Then, I was thinking of a regular expression to replace all Underscor in the page name by an hyphen. Unfortunately, I am not strong enough to reach such a goal... Any help would be greatly appreciated. If it can facilitate the work, I can rename my page the way we want (because I have a multi lingual portal with Apollo module, consequently, the page name appears differently than the original name I give: I can have a page named Keyword1_Keyword2 and it will show as Keyword1 Keyword2 - Apollo rewrites the display of the page name. Consequently, we could imagine having page name like: Keyword1xx_xxKeyword2 and using a regex to search for "xx_xx" and replace with "-" ???? DV | | | |
| |
| John Mitchell Posts:3248


| | 04/21/2007 7:19 AM |
| Hi DV,
Let me do some experimenting and I'll see if I can come up with a solution to do what you are wanting. | | | |
| Déclic Vidéo
 Posts:57


| | 04/21/2007 3:36 PM |
| Just perfect, thank you !!
But have you seen that I have found a solution which works (but I do not find it very nice....)
Portal Rules Search For Keyword1Keyword2.aspx and replace with Keyword1-Keyword2.aspx I must also go into Host Settings / Advanced Settings / Friendly URL Settings Match .*/Keyword1-Keyword2/Keyword3.aspx Replace with ~/Default.aspx?TabId=xx
DV | | | |
| Déclic Vidéo
 Posts:57


| | 04/27/2007 3:07 PM |
| Hello John,
Have you found a nice solution ??? The one I use is not so good.... :-(
DV | | | |
| John Mitchell Posts:3248


| | 04/27/2007 9:10 PM |
| Hi DV, Not yet. I had some other pressing issues this week, but I should be able to get to it this weekend. | | | |
| Nelson Fernandez
 Posts:50

| | 04/28/2007 2:04 PM |
| FWIW, I use Ventrian Friendly URLs also. I have found that by default page names with spaces turn into dashes and works just fine. For example:
My page name is"Describing Sounds-Terminology" and Ventrian makes it:
http://www.warbeats.com/Articles/tabid/65/articleType/ArticleView/articleId/9/Describing-Sounds--Terminology.aspx
| | | |
| Déclic Vidéo
 Posts:57


| | 04/28/2007 2:30 PM |
| Hello nfx,
This only works for URL in News Article module, not valid for other pages... The discussion is in progress here: http://www.ventrian.com/Support/ProductForums/tabid/118/forumid/35/postid/10301/view/topic/Default.aspx
But since it works with Page Blaster and I need it quite urgently, I will do it with Page Blaster (immediately with the "hack" I found, later on with the nice solution that John will certainly find...)
DV | | | |
| Déclic Vidéo
 Posts:57


| | 05/01/2007 8:35 AM |
| John,
I really need this feature. Any progress ???
I thought that Page Blaster was able to rename pages ??? It seems that it does not work for me (excepted the hack I talked about before) ???
DV | | | |
| Nelson Fernandez
 Posts:50

| | 05/02/2007 4:58 PM |
| I don't know if this will help but I read this today and thought of your issue:
http://seablick.com/blog/tabid/53/articletype/articleview/articleid/30/hacking-hyphens-into-dnn-urls.aspx | | | |
| Déclic Vidéo
 Posts:57


| | 05/09/2007 1:23 PM |
| Thanks a lot nfx, but look at the comments, I have commented it: there is a problem as soon as you try to enter the setting of a module......... Still waiting another solution.
John, I was thinking of the following: I will get rid of Friendly URLs (Ventrian module), and I will exclusively use PageBlaster. But in this case, I do not know if I have to switch on/off the friendly url in DNN. And I do not know neither, if I have to set a REPLACEMENT in PageBlaster or a "Virtual Path" (but in this last case, I have understood that I need to add the module in each page, that's correct ? --> maybe not the best solution)
DV | | | |
| John Mitchell Posts:3248


| | 05/09/2007 2:24 PM |
| Setting a replacement or a virtual path depends on what you want to accomplish. To explain this, let me step back a little. The virtual-path ability of PageBlaster is not the same as a UrlRewriter. It was actually only added to as a feature to PageBlaster because it was fairly easy to give a cached page a virtual lookup name. Most Url Rewriters will not only allow you to address the pages with specific urls, but will also change the output of your pages so that any urls that are generated inside your site will also be "friendly". So, PageBlaster first caches your page and saves it in memory or on disk. Then it allows you to use a virtual-path to retrieve it. To update the virtual-path for a specific page, you can put the DNN module on that page. This allows the UI to know what the actual tabId is for the page being assigned a virtual path. And allows it to update an internal lookup table with the cross reference from virtual-path to tabid. What happens when you update the virtual-path using the PageBlaster DNN Module for configuration is that it puts the "lookup" or cross-reference into a file called ResourceLocationTable.config. That file is located in the folder specified in your config file with the attribute config-folder. Now, if you want to update the resource location table that PageBlaster uses for for mapping a virtual-path to an actual tab, you could go in and just update that file directly with an editor. This will keep you from having to add the PageBlaster module to each page you want a virtual path for. Also, once the file is there, you no longer need the module on the page. Now, updating the ResourceLocationTable.config file will allow people to address the pages using the virtual path that you specify, but it will not change the output of your page. Usually, a url rewriter will rewrite the output of the page according to a specific rule. Something like "any time there is a link with default.aspx & tabid, then make it look more friendly". With PageBlaster there isn't a specific rule, you get to define it for any replacement that you want to do. So, Replacements are the second part of setting up a friendly Url and are optional. They are not needed to allow the page to be addressed using the virtual path. But for SEO purposes, and to save general confusion you may want to replace the links in your page to match with the virtual-path. If you want a more generalized approach to rewriting Urls so that you do not need to specify each one individually, then I highly recommend using HrefExchanger from Inventua. PageBlaster and HrefExchanger can work side-by-side to give you the most flexability. | | | |
| Déclic Vidéo
 Posts:57


| | 05/09/2007 2:30 PM |
| Posted By John Mitchell on 05/09/2007 2:24 PM
{...}So, Replacements are the second part of setting up a friendly Url and are optional. They are not needed to allow the page to be addressed using the virtual path. But for SEO purposes, and to save general confusion you may want to replace the links in your page to match with the virtual-path.
If you want a more generalized approach to rewriting Urls so that you do not need to specify each one individually, then I highly recommend using HrefExchanger from Inventua. PageBlaster and HrefExchanger can work side-by-side to give you the most flexability.
Yes, but in the past, I tried HRefExchanger, and I had plenty of problems in configuring it, and having it working with localised portal.... Surely good for one language, but not for multi-lingual portal... Maybe I am wrong, just let me know in this case !! That's why I switch to Friendly URLs.
I may try again, but I am not convinced at all.
In the mean time, could you give an example of how I could REPLACE some of my pages ? Let's take this example:
Home Page in french: http://mydomain.com/Home/tabid/36/language/fr-FR/Default.aspx
and in english: http://mydomain.com/Home/tabid/36/language/en-US/Default.aspx
What should it look like for the replacement ?? DV | | | |
| John Mitchell Posts:3248


| | 05/09/2007 2:44 PM |
| Yes, it is a complicated and low level task to change Urls and ouput of ASP.net pages. HrefExchanger has it's own limitations because of using the page name for the friendly name.
To create a friendly url for those two different links you would want to create just one virtual-path. Let's make it "Home.aspx".
Then, to do the replacement you could use: SearchFor: http://declic-video-fx.com/Home/tabid/36/language/(.*?)/Default.aspx ReplaceWith: http://declic-video-fx.com/Home.aspx?language=$1
| | | |
| Déclic Vidéo
 Posts:57


| | 05/10/2007 1:43 AM |
| Posted By John Mitchell on 05/09/2007 2:44 PM
Yes, it is a complicated and low level task to change Urls and ouput of ASP.net pages. HrefExchanger has it's own limitations because of using the page name for the friendly name.
To create a friendly url for those two different links you would want to create just one virtual-path. Let's make it "Home.aspx".
Then, to do the replacement you could use:
SearchFor: http://declic-video-fx.com/Home/tabid/36/language/(.*?)/Default.aspx
ReplaceWith: http://declic-video-fx.com/Home.aspx?language=$1
Excuse me, you said that I could create one virtual-path, and after, you explain how to do a replacement... I am lost. Where should I put it ??? Replacement or virtual path ?
Anyway, it's not friendly this way. Because you have "?language=$1"...
I would like something simple, like Home.aspx only.
I am sorry, but I am a newby, I really need help on this topic, step by step (and I think it will help other people)
DV | | | |
| John Mitchell Posts:3248


| | 05/10/2007 7:11 AM |
| You first need a virtual-path setting, then you need an optional replacement as outlined in my prior post. Virtual-path is for Input, Replacement is for Output.
Having a querystring variable is not "Unfriendly". If you go to google and personalize your home page you will see that they do it the same way.
But if you don't like it that way then you can use: SearchFor: http://declic-video-fx.com/Home/tabid/36/language/(.*?)/Default.aspx ReplaceWith: http://declic-video-fx.com/language/$1/Home.aspx
The replacement should be done as a "Portal Rule", so that it makes the replacements on all pages.
If you do it this way then you will also want to make sure that the UrlRewriter is placed below the PageBlaster module in the HttpModules section of Web.config. THe reason for this is so that the UrlRewriter will make it's changes to the url before the PageBlaster module compares it to the virtual path lookup.
| | | |
| Déclic Vidéo
 Posts:57


| | 05/10/2007 8:02 AM |
| Posted By John Mitchell on 05/10/2007 7:11 AM
{...}
Virtual-path is for Input, Replacement is for Output.
{...}
If you do it this way then you will also want to make sure that the UrlRewriter is placed below the PageBlaster module in the HttpModules section of Web.config.
THe reason for this is so that the UrlRewriter will make it's changes to the url before the PageBlaster module compares it to the virtual path lookup.
{...}
Hello John,
Need a little bit explanation, and everything will be clear.
1/
Virtual-Path for Input, I understand.
Replacement for Output, I do not understand... Can you give an example, I do not see at all what it is.
For example, what will happen if I only have Virtual Path defined ??? 2/
Otherwise, concerning the order in the web.config, could you just verify ? You said UrlRewriter BELOW PageBlaster, and in the sentence after, you put that UrlRewriter make its change BEFORE PageBlaster ==> isn't it the opposite in this case ?? 3/
And finally, why using a UrlRewriter if I define each page in PageBlaster (Replacement and/or Virtual Path) ??? DV FX | | | |
| John Mitchell Posts:3248


| | 05/10/2007 8:25 AM |
| 1/ If you look at the html source of your page it will have links in it for your navigation. This html is the Output of your page. The server builds this page dynamically using it's own friendly urls. Replacments change the output of your page before it gets to the browser. So you can match the output to what someone uses on the input. If you only have a virtual path defined you will send links to your page that are different than what you might give to someone else to link to you. So a search engine may come along and think it has two pages (since it makes the index by url) with the same content. This is not good for SEO, but not the highest priority either. 2/ The list of modules in the HttpModules section are executed in "First In - Last Out" order, so it may look backwards. The one at the top of the list is the last one to get executed. This is why the compression module has to be at or very near the top because if it compresses the output of the page too early, then the other filters won't have a chance to work with the raw output. If the UrlRewriter is above the PageBlaster then the Urls will still be in the "friendly" format - tabid/36/language/en-US/default.aspx when the PageBlaster sees the Url. 3/ You do not have to use a UrlRewriter if you make friendly Urls in another way. As a matter of fact, the HrefExchanger requires you to turn off the default FriendlyUrls because it makes it easier for it to do it's work if it is a raw url with a normal querystring. | | | |
| Déclic Vidéo
 Posts:57


| | 05/10/2007 8:48 AM |
| 1/ When I started DNN, I had a look to the links dynamically generated, and I saw quite everywhere: xxxLinckClickxxx ==> Not SEO at all, nor friendly... That's the reason why I decided to customize my links everywhere. Everywhere I have to re-direct to an internal page, I put a relative path, friendly one like: /Hollywood-FX/Free-HFX.aspx This way, I do not have any problem (because Friendly URLs Ventrian do not take into account this linkclick format - nor Hrefexchanger) ==> Problem solved (more work for me, but the way like it should be)
2/ Very clear. I understand why I have problem when I click on the flag in my pages. If you look at it, I have a URL which have the language in it ! Try it: http://declic-video-fx.com (home page), and then you click on english or french, you will see an awfull URL... This is because I have put UrlRwriter AFTER PageBlaster (PageBlaster is the first one in the web.config, the last one to be executed...) ==> I will correct this asap.
3/ Consequently, I will try to use exclusively PageBlaster. I will turn on DNN friendly URL, and then, I will put a virtual path (PageBlaster) for each page. And in each page, I have a reference (relative and friendly) to all my page, this way I do not worry about the Output. ==> Problem (partially) solved (see 4/)
4/ But now, what about the language.... Should I use THREE virtual path for each tab ? The one which does not contain the language parameter + the one containing the FR language + the one containing the EN language ? What is your opinion ??
DV | | | |
| John Mitchell Posts:3248


| | 05/10/2007 9:11 AM |
| If you don't want to define seperate virtual-paths for each language, then you can switch the UrlRewriter so that PageBlaster sees the language as a querystring variable. Put UrlRewriter after PageBlaster in the HttpModules list. Then your virtual-path will be: Home.aspx And for different languages you will have to specify it on the Url: Home.aspx?language=en-Us Seems like I have written something like this recently ;) | | | |
| Déclic Vidéo
 Posts:57


| | 05/10/2007 9:17 AM |
| Posted By John Mitchell on 05/09/2007 2:24 PM {...}If you want a more generalized approach to rewriting Urls so that you do not need to specify each one individually, then I highly recommend using HrefExchanger from Inventua. PageBlaster and HrefExchanger can work side-by-side to give you the most flexability.
Examples of what problems I encountered:
Problems with languages: http://www.inventua.com/forums.content?view=topic&forumid=1&postid=2588
DV | | | |
|
|