Re: [WebDNA] Pretty URLS

This WebDNA talk-list message is from

2011


It keeps the original formatting.
numero = 106582
interpreted = N
texte = --Apple-Mail-1--785795988 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Something like this: TemplateNotFound[text]product_to_find=3D[middle = startafter=3D/&endbefore=3D.][thisurl][/middle][/text][Search = db=3D^data/directproducts.db&eqACTIVEdatarq=3DT&eqWEBORDERdatarq=3DT&woGRO= UP1datarq=3D[product_to_find]&GROUP1field=3DDirectproduct+Type+Type02+type= 03+Brand+Description+Colour&max=3D1][founditems][include = file=3D^include/site/productpage01.inc][/founditems][showif = [numfound]=3D0][redirect = error.html?id=3D[product_to_find]][/showif][/search] This of course depends on how your product db is structured. I also use isapi_rewrite to do this, which could very easily be done in = webdna "TemplateNotFound" # This rule is to manage products when URL =3D = http://www.domain.com.au/brandname/productname.html RewriteRule/([a-z,0-9\_\-\%\+]+)/([a-z,0-9\_\-\%\+]+).html= /productdisplay.html\?brandname=3D$1&productname=3D$2[I,L] On 28/04/2011, at 12:58 AM, Brian B. Burton wrote: > What I think I'd like to do is tie into the page not found system,=20 > i.e. have the server send my 404 request to instead of error.html to = URLs.tpl >=20 > that way all pages act as they do currently BUT > for any "pretty" URL, it gets "not found" and rerouted to URLs.tpl >=20 > and inside that file i want to do something like: (yes this is 100% = wrong, just typing outloud here) > [showif [url][thispage][/url]=3D[grep]('notebook_battery/$')[/grep]] = [include file=3Dalphamfg.tpl&_CID=3D2][/showif] > [showif = [url][thispage][/url]=3D[grep]('('notebook_battery/(?P\w+)/$')[/grep]= ] [include file=3Dpickmodel&_CID=3D2&_MFG=3D[MFG]][/showif] > [showif = [url][thispage][/url]=3D[grep]('('notebook_battery/(?P[^/]+)/(?P= \d+).*')[/grep]] [include = file=3Dmodelinfo&_CID=3D2&_MFG=3D[MFG]&_FID=3D[FID]][/showif] >=20 > (and have a last rule that actually redirects to a 404 page...) >=20 > I want to figure out how to use an include so that i'm specifically = not rewriting and redirecting the URL (thus making it ugly) >=20 > Anyone currently doing anything like this? > If I can figure out how to do it, is anyone else interested in the = code? >=20 >=20 >=20 >=20 > Brian B. Burton > brian@burtons.com >=20 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > time is precious. waste it wisely > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >=20 >=20 >=20 > On Apr 27, 2011, at 6:22 AM, William DeVaul wrote: >=20 >> On Tue, Apr 26, 2011 at 11:38 PM, Kenneth Grome = wrote: >>>> I'm not sure why you'd leave the humans ugly URLs. >>>=20 >>> Because those URLs are the default URLs for WebDNA. >>=20 >> I thought the parameterized URLs were a convention that came about in >> the early days of the Internet. Seems the convention is ripe for >> change. >>=20 >> In general, I'm for programmer convenience versus optimization for = the >> computer. But I'd put user convenience above the programmer's. In >> some frameworks the default is "prettier" to the benefit of users and >> programmers. >>=20 >>>> The search engines like keywords. >>>=20 >>> They get plenty of keywords in the static pages. >>=20 >> I think it is about quality of the keyword placement (in incoming >> links, in the domain, in the URLs, in "important" tags e.g.

). >=20 >=20 > --------------------------------------------------------- > This message is sent to you because you are subscribed to > the mailing list . > To unsubscribe, E-mail to: > archives: http://mail.webdna.us/list/talk@webdna.us > Bug Reporting: support@webdna.us --Apple-Mail-1--785795988 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii Something like this:

TemplateNotFound= [text]product_to_find=3D[middle = startafter=3D/&endbefore=3D.][thisurl][/middle][/text][Search = db=3D^data/directproducts.db&eqACTIVEdatarq=3DT&eqWEBORDERdatarq=3D= T&woGROUP1datarq=3D[product_to_find]&GROUP1field=3DDirectproduct+T= ype+Type02+type03+Brand+Description+Colour&max=3D1][founditems][includ= e file=3D^include/site/productpage01.inc][/founditems][showif = [numfound]=3D0][redirect = error.html?id=3D[product_to_find]][/showif][/search]

This of course depends on how your product db is = structured.


I also use isapi_rewrite to = do this, which could very easily be done in webdna = "TemplateNotFound"

# This rule is to manage products = when URL =3D http://www.do= main.com.au/brandname/productname.html
RewriteRule= /([a-z,0-9\_\-\%\+]+)/([a-z,0-9\_\-\%\+]+).html= /productdisplay.html\?brandname=3D$1&productname=3D$2= [I,L]




On 28/04/2011, at 12:58 AM, Brian B. Burton = wrote:

What I think I'd like to do is tie into the page not = found system,
i.e. have the server send my 404 request to instead of = error.html to URLs.tpl

that way all pages act as they do = currently BUT
for any "pretty" URL, it gets "not found" and rerouted = to URLs.tpl

and inside that file i want to do something like: = (yes this is 100% wrong, just typing outloud here)
=    [showif = [url][thispage][/url]=3D[grep]('notebook_battery/$')[/grep]] =    [include file=3Dalphamfg.tpl&_CID=3D2][/showif]
=    [showif = [url][thispage][/url]=3D[grep]('('notebook_battery/(?P<MFG>\w+)/$')[= /grep]]     [include = file=3Dpickmodel&_CID=3D2&_MFG=3D[MFG]][/showif]
=    [showif = [url][thispage][/url]=3D[grep]('('notebook_battery/(?P<MFG>[^/]+)/(?= P<FID>\d+).*')[/grep]]    [include = file=3Dmodelinfo&_CID=3D2&_MFG=3D[MFG]&_FID=3D[FID]][/showif]<= br>
(and have a last rule that actually redirects to a 404 = page...)

I want to figure out how to use an include so that i'm = specifically not rewriting and redirecting the URL (thus making it = ugly)

Anyone currently doing anything like this?
If I can = figure out how to do it, is anyone else interested in the = code?




Brian B. Burton
brian@burtons.com

=            =3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D
=             &n= bsp;       time is precious. waste it = wisely
=            =3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D



On Apr 27, 2011, at 6:22 AM, William = DeVaul wrote:

On Tue, Apr 26, 2011 at = 11:38 PM, Kenneth Grome <kengrome@gmail.com> = wrote:
I'm not sure why you'd leave the = humans ugly URLs.

Because those URLs are the = default URLs for WebDNA.

I thought the = parameterized URLs were a convention that came about = in
the early days of the = Internet.  Seems the convention is ripe = for
change.

In general, I'm = for programmer convenience versus optimization for = the
computer.  But I'd = put user convenience above the programmer's. =  In
some frameworks the = default is "prettier" to the benefit of users = and
programmers.

The search engines like = keywords.

They get plenty of keywords in = the static pages.

I think it is = about quality of the keyword placement (in = incoming
links, in the domain, = in the URLs, in "important" tags e.g. = <h1>).


-------------------------------------= --------------------
This message is sent to you because you are = subscribed to
the mailing list <talk@webdna.us>.
To = unsubscribe, E-mail to: <talk-leave@webdna.us>
archives: = http://mail.webdna.us/list/talk@webdna.us
Bug Reporting: = support@webdna.us

= --Apple-Mail-1--785795988-- Associated Messages, from the most recent to the oldest:

    
  1. Re: [WebDNA] Pretty URLS (William DeVaul 2011)
  2. Re: [WebDNA] Pretty URLS (sgbc cebu 2011)
  3. Re: [WebDNA] Pretty URLS (Tom Duke 2011)
  4. Re: [WebDNA] Pretty URLS (William DeVaul 2011)
  5. Re: [WebDNA] Pretty URLS (Stuart Tremain 2011)
  6. Re: [WebDNA] Pretty URLS (Kenneth Grome 2011)
  7. Re: [WebDNA] Pretty URLS (Brian Fries 2011)
  8. Re: [WebDNA] Pretty URLS (Kenneth Grome 2011)
  9. Re: [WebDNA] Pretty URLS (Govinda 2011)
  10. Re: [WebDNA] Pretty URLS (Daniel Meola 2011)
  11. Re: [WebDNA] Pretty URLS ("Brian B. Burton" 2011)
  12. Re: [WebDNA] Pretty URLS (Kenneth Grome 2011)
  13. Re: [WebDNA] Pretty URLS ("Brian B. Burton" 2011)
  14. Re: [WebDNA] Pretty URLS (William DeVaul 2011)
  15. Re: [WebDNA] Pretty URLS (Kenneth Grome 2011)
  16. Re: [WebDNA] Pretty URLS (William DeVaul 2011)
  17. Re: [WebDNA] Pretty URLS (Govinda 2011)
  18. Re: [WebDNA] Pretty URLS (Kenneth Grome 2011)
  19. Re: [WebDNA] Pretty URLS (William DeVaul 2011)
  20. Re: [WebDNA] Pretty URLS (Stuart Tremain 2011)
  21. [WebDNA] Pretty URLS ("Brian B. Burton" 2011)
--Apple-Mail-1--785795988 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Something like this: TemplateNotFound[text]product_to_find=3D[middle = startafter=3D/&endbefore=3D.][thisurl][/middle][/text][Search = db=3D^data/directproducts.db&eqACTIVEdatarq=3DT&eqWEBORDERdatarq=3DT&woGRO= UP1datarq=3D[product_to_find]&GROUP1field=3DDirectproduct+Type+Type02+type= 03+Brand+Description+Colour&max=3D1][founditems][include = file=3D^include/site/productpage01.inc][/founditems][showif = [numfound]=3D0][redirect = error.html?id=3D[product_to_find]][/showif][/search] This of course depends on how your product db is structured. I also use isapi_rewrite to do this, which could very easily be done in = webdna "TemplateNotFound" # This rule is to manage products when URL =3D = http://www.domain.com.au/brandname/productname.html RewriteRule/([a-z,0-9\_\-\%\+]+)/([a-z,0-9\_\-\%\+]+).html= /productdisplay.html\?brandname=3D$1&productname=3D$2[I,L] On 28/04/2011, at 12:58 AM, Brian B. Burton wrote: > What I think I'd like to do is tie into the page not found system,=20 > i.e. have the server send my 404 request to instead of error.html to = URLs.tpl >=20 > that way all pages act as they do currently BUT > for any "pretty" URL, it gets "not found" and rerouted to URLs.tpl >=20 > and inside that file i want to do something like: (yes this is 100% = wrong, just typing outloud here) > [showif [url][thispage][/url]=3D[grep]('notebook_battery/$')[/grep]] = [include file=3Dalphamfg.tpl&_CID=3D2][/showif] > [showif = [url][thispage][/url]=3D[grep]('('notebook_battery/(?P\w+)/$')[/grep]= ] [include file=3Dpickmodel&_CID=3D2&_MFG=3D[MFG]][/showif] > [showif = [url][thispage][/url]=3D[grep]('('notebook_battery/(?P[^/]+)/(?P= \d+).*')[/grep]] [include = file=3Dmodelinfo&_CID=3D2&_MFG=3D[MFG]&_FID=3D[FID]][/showif] >=20 > (and have a last rule that actually redirects to a 404 page...) >=20 > I want to figure out how to use an include so that i'm specifically = not rewriting and redirecting the URL (thus making it ugly) >=20 > Anyone currently doing anything like this? > If I can figure out how to do it, is anyone else interested in the = code? >=20 >=20 >=20 >=20 > Brian B. Burton > brian@burtons.com >=20 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > time is precious. waste it wisely > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >=20 >=20 >=20 > On Apr 27, 2011, at 6:22 AM, William DeVaul wrote: >=20 >> On Tue, Apr 26, 2011 at 11:38 PM, Kenneth Grome = wrote: >>>> I'm not sure why you'd leave the humans ugly URLs. >>>=20 >>> Because those URLs are the default URLs for WebDNA. >>=20 >> I thought the parameterized URLs were a convention that came about in >> the early days of the Internet. Seems the convention is ripe for >> change. >>=20 >> In general, I'm for programmer convenience versus optimization for = the >> computer. But I'd put user convenience above the programmer's. In >> some frameworks the default is "prettier" to the benefit of users and >> programmers. >>=20 >>>> The search engines like keywords. >>>=20 >>> They get plenty of keywords in the static pages. >>=20 >> I think it is about quality of the keyword placement (in incoming >> links, in the domain, in the URLs, in "important" tags e.g.

). >=20 >=20 > --------------------------------------------------------- > This message is sent to you because you are subscribed to > the mailing list . > To unsubscribe, E-mail to: > archives: http://mail.webdna.us/list/talk@webdna.us > Bug Reporting: support@webdna.us --Apple-Mail-1--785795988 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii Something like this:

TemplateNotFound= [text]product_to_find=3D[middle = startafter=3D/&endbefore=3D.][thisurl][/middle][/text][Search = db=3D^data/directproducts.db&eqACTIVEdatarq=3DT&eqWEBORDERdatarq=3D= T&woGROUP1datarq=3D[product_to_find]&GROUP1field=3DDirectproduct+T= ype+Type02+type03+Brand+Description+Colour&max=3D1][founditems][includ= e file=3D^include/site/productpage01.inc][/founditems][showif = [numfound]=3D0][redirect = error.html?id=3D[product_to_find]][/showif][/search]

This of course depends on how your product db is = structured.


I also use isapi_rewrite to = do this, which could very easily be done in webdna = "TemplateNotFound"

# This rule is to manage products = when URL =3D http://www.do= main.com.au/brandname/productname.html
RewriteRule= /([a-z,0-9\_\-\%\+]+)/([a-z,0-9\_\-\%\+]+).html= /productdisplay.html\?brandname=3D$1&productname=3D$2= [I,L]




On 28/04/2011, at 12:58 AM, Brian B. Burton = wrote:

What I think I'd like to do is tie into the page not = found system,
i.e. have the server send my 404 request to instead of = error.html to URLs.tpl

that way all pages act as they do = currently BUT
for any "pretty" URL, it gets "not found" and rerouted = to URLs.tpl

and inside that file i want to do something like: = (yes this is 100% wrong, just typing outloud here)
=    [showif = [url][thispage][/url]=3D[grep]('notebook_battery/$')[/grep]] =    [include file=3Dalphamfg.tpl&_CID=3D2][/showif]
=    [showif = [url][thispage][/url]=3D[grep]('('notebook_battery/(?P<MFG>\w+)/$')[= /grep]]     [include = file=3Dpickmodel&_CID=3D2&_MFG=3D[MFG]][/showif]
=    [showif = [url][thispage][/url]=3D[grep]('('notebook_battery/(?P<MFG>[^/]+)/(?= P<FID>\d+).*')[/grep]]    [include = file=3Dmodelinfo&_CID=3D2&_MFG=3D[MFG]&_FID=3D[FID]][/showif]<= br>
(and have a last rule that actually redirects to a 404 = page...)

I want to figure out how to use an include so that i'm = specifically not rewriting and redirecting the URL (thus making it = ugly)

Anyone currently doing anything like this?
If I can = figure out how to do it, is anyone else interested in the = code?




Brian B. Burton
brian@burtons.com

=            =3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D
=             &n= bsp;       time is precious. waste it = wisely
=            =3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D



On Apr 27, 2011, at 6:22 AM, William = DeVaul wrote:

On Tue, Apr 26, 2011 at = 11:38 PM, Kenneth Grome <kengrome@gmail.com> = wrote:
I'm not sure why you'd leave the = humans ugly URLs.

Because those URLs are the = default URLs for WebDNA.

I thought the = parameterized URLs were a convention that came about = in
the early days of the = Internet.  Seems the convention is ripe = for
change.

In general, I'm = for programmer convenience versus optimization for = the
computer.  But I'd = put user convenience above the programmer's. =  In
some frameworks the = default is "prettier" to the benefit of users = and
programmers.

The search engines like = keywords.

They get plenty of keywords in = the static pages.

I think it is = about quality of the keyword placement (in = incoming
links, in the domain, = in the URLs, in "important" tags e.g. = <h1>).


-------------------------------------= --------------------
This message is sent to you because you are = subscribed to
the mailing list <talk@webdna.us>.
To = unsubscribe, E-mail to: <talk-leave@webdna.us>
archives: = http://mail.webdna.us/list/talk@webdna.us
Bug Reporting: = support@webdna.us

= --Apple-Mail-1--785795988-- Stuart Tremain

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

IIS4 (1998) emailer stuck (1997) Sendmail doesn't (was Queertrons?) (1997) HTML Editors (1997) change the number format (1997) Updating fields from different platforms (1998) Problem (1997) WebDelivery downloads alias, not original ? (1997) Exclamation point (1997) Mime Headers for Mail (1998) Search returns all, not 20 (1997) WebCat2 several catalogs? (1997) price formula (1999) WC2.0 Memory Requirements (1997) Add a field to the error log? (1997) WebDNA 5 & iTools 7 (2003) default value from Lookup (was Grant, please help me) (1997) Searchable mail archive problems (2003) Automated FTP from Shell - Update (2004) WCS Newbie question (1997)