Web Connection
URL without extension
Gravatar is a globally recognized avatar based on your email address. URL without extension
  Marcel DESMET
  All
  Oct 27, 2017 @ 02:55pm

Hello,

To optimize google ranking i want to use the item description and category in the URL

I thing this is possible with webconnection with a URL like

www.mywebsite.com/myproductcategory/myproductdescription/showitem.wwt

showitem VFP method could analyse the calling URL to locate the item ..

But my question is how did Amazon handle such URL without file extension

https://www.amazon.com/books-used-books-textbooks/b/ref=topnav_storetab_b?ie=UTF8&node=283155

Is It possible to handle this type of request with IIS and Webconnection ?

Thank you

Gravatar is a globally recognized avatar based on your email address. re: URL without extension
  Marcel DESMET
  Tore Bleken
  Oct 28, 2017 @ 02:13am

Yes looks like, tank you Tore !

Gravatar is a globally recognized avatar based on your email address. re: URL without extension
  Tore Bleken
  Marcel DESMET
  Oct 28, 2017 @ 07:23am

You're welcome.

Gravatar is a globally recognized avatar based on your email address. re: URL without extension
  Rick Strahl
  Marcel DESMET
  Oct 29, 2017 @ 10:03pm

To use URLs like you are suggesting should work without the requirements for extensionless URLs and without URL Rewriting. But you will still need to figure out some custom URL parsing in order to figure out what values to retrieve from the URL to determine products and categories.

Script maps work all the way down the configured Web root path so regardless of where the URL lives in the 'directory' hiearachy, ShowItem.wwt will fire the ShowItem method in your applicable process class. You can use wwRequest::GetRoutingInfo() to retrieve the route segments.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: URL without extension and trigger Web Connection with HTML
  Marcel DESMET
  Rick Strahl
  Oct 31, 2017 @ 02:30am

Thank you Rick !

Some old Html documents have a good ranking so I ask me also the best way to trigger Web Connection with HTML extension I suppose I have to use the IIS UrlRewrite Module ?

Gravatar is a globally recognized avatar based on your email address. re: URL without extension and trigger Web Connection with HTML
  Rick Strahl
  Marcel DESMET
  Oct 31, 2017 @ 10:47am

If all html documents in your app are going through Web Connection then you can just add a script map for HTML and handle it in Web Connection. That's probably the easiest. But that only works if every html page in that virtual/site goes through WWWC.

Otherwise yes, you need to URL Rewrite or create a .NET based rewrite handler to figure out exactly what to route where.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: URL without extension and trigger Web Connection with HTML
  Marcel DESMET
  Rick Strahl
  Nov 4, 2017 @ 10:52am

Thank you Rick !

Another of my current question is about a double extension like

showitem.amp.wwt ( showitem.amp method is not possible in VFP)

So what would be the best way to rewrite the url before processing by the RouteRequest() ?

Gravatar is a globally recognized avatar based on your email address. re: URL without extension and trigger Web Connection with HTML
  Rick Strahl
  Marcel DESMET
  Nov 4, 2017 @ 12:10pm

First off I think double extensions are a bad idea. But if you use any kind of extension, you shouldn't need any rewrite rules because Web Connection will pick up the last extension.

The URL parsing beyond that your code can handle.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: URL without extension and trigger Web Connection with HTML
  Marcel DESMET
  Rick Strahl
  Nov 4, 2017 @ 12:40pm

I found a sample for the Accelerated Mobile Pages Project – AMP in the Google tutorial samples with this double extension. ( Article.amp.html versus article.html (for HTML) ).

As the logic beyond showitem is the same ( for HTML and AMP ) it could be nice to handle the request with same method and just set a process property to indicate we have to handle another layout .. . Not tested but it seems AMP is not compatible with standard boostrap ( we have to handle it with a 'light' version ) This could be with done with alternate path, but I was curious ..

© 1996-2024