Re: [WebDNA] behavior of [thisurl] in the context of 'mod_rewrite'

This WebDNA talk-list message is from

2012


It keeps the original formatting.
numero = 108180
interpreted = N
texte = --0050450180b6a53c3e04b7351171 Content-Type: text/plain; charset=ISO-8859-1 Here is a link to a live page with a URL that is totally rewritten to provide page content: http://www.connectedcollector.com/replacements/Arabia_Of_Finland_China/Paju.htm The href in the link at the bottom of the page that reads "Click here for more info" is the result of a [thisurl]. I assure you that there is no directory for "Arabia_Of_Finland_China or a file named Paju.htm. Bill If you really want to dig into this, here is the rewrite: RewriteEngine On #permanent redirect of urls with _-_ to a conforming hyphenless url RewriteRule ^/replacements/(.*)(_-_)(.*).htm /replacements/$1_$3.htm [R=301] RewriteRule ^/replacements/(.*)-(.*).htm /replacements/$1_$2.htm [R=301] #finds maker only (no number before .htm) => /replacements/search1.htm RewriteCond %{REQUEST_URI} !/index.htm RewriteRule ^/replacements/([0-9A-Za-z_]+[^0-9]).htm$ /replacements/search1.htm?manufname=$1 [L,NC] #finds maker and range => /replacements/search2.htm RewriteCond %{REQUEST_URI} !/replacements/([0-9A-Za-z_]+[^0-9]).htm$ RewriteRule ^/replacements/([0-9A-Za-z_]+)_([0-9]+).htm$ /replacements/search2.htm?manufname=$1&start=$2 [L,NC] #finds maker and pattern => /replacements/search3.htm RewriteRule ^/replacements/([^/]+)/([0-9A-Za-z_]+).htm /replacements/search3.htm?manufname=$1&patternname=$2 [L,NC] Please note that the first two lines in the rewrite end with a 301 redirect so the browser actually sends a different request to the rewritten URL. Here's a portion of the code from /replacements/search3.htm (what is run even though the browser's address is unchanged:
[switch value=[v_id]] [case value=V001] [mfrclean] [patternname] [mfrsuffix] [/case] [case value=V002] Find more [patternname] by [mfrclean] [/case] [case value=V003] Locate pieces in [mfrclean] [mfrsuffix] [/case] [case value=V004] More [mfrclean] [patternname] information can be found here. [/case] [case value=V005] Other sources of [patternname][/case] [case value=] [mfrclean] [patternname][/case] [default] Click here for more info... [/default] [/switch]
--0050450180b6a53c3e04b7351171 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Here is a link to a live page with a URL that is totally rewritten to = provide page content:

http://www.connec= tedcollector.com/replacements/Arabia_Of_Finland_China/Paju.htm

The href in the link at the bottom of the page that rea= ds "Click here for more info" is the result of a [thisurl]. =A0I = assure you that there is no directory for "Arabia_Of_Finland_China or = a file named Paju.htm. =A0

Bill

If you really want to dig= into this, here is the rewrite:

RewriteEngin= e On

#permanent redirect of urls with _-_ to a con= forming hyphenless url
RewriteRule ^/replacements/(.*)(_-_)(.*).htm /replacements/$1_$3.htm [= R=3D301]
RewriteRule ^/replacements/(.*)-(.*).htm /replacements/$= 1_$2.htm [R=3D301]

#finds maker only (no number be= fore .htm) =3D>=A0/replacements/search1.htm
RewriteCond %{REQUEST_URI} !/index.htm
RewriteRule ^/replace= ments/([0-9A-Za-z_]+[^0-9]).htm$ /replacements/search1.htm?manufname=3D$1 [= L,NC]

#finds maker and range =3D>=A0/replacemen= ts/search2.htm
RewriteCond %{REQUEST_URI} !/replacements/([0-9A-Za-z_]+[^0-9]).htm$
RewriteRule ^/replacements/([0-9A-Za-z_]+)_([0-9]+).htm$ /replacem= ents/search2.htm?manufname=3D$1&start=3D$2 [L,NC]

<= div> #finds maker and pattern =3D> /replacements/search3.htm
Rewrit= eRule ^/replacements/([^/]+)/([0-9A-Za-z_]+).htm /replacements/search3.htm?= manufname=3D$1&patternname=3D$2 [L,NC]


Please note that the first two lines in the rewrite end with a 301 red= irect so the browser actually sends a different request to the rewritten UR= L. =A0


Here's a portion of the = code from /replacements/search3.htm (what is run even though the browser= 9;s address is unchanged: =A0

<table width=3D"580" align=3D"ce= nter"><tr><td align=3D"center">
<= ;font size=3D"-2"><a href=3D"http://www.connectedcollector.com[thisurl]"&g= t;
[switch value=3D[v_id]]
[case value=3DV001]
[mfrcl= ean] [patternname] [mfrsuffix]
[/case]
[case value=3DV0= 02]
Find more [patternname] by [mfrclean]=A0
[/case]
[case value=3DV003]
Locate pieces in [mfrclean] [mfrsuffix]
=
[/case]
[case value=3DV004]
More [mfrclean] [patte= rnname] information can be found here.
[/case]
[case va= lue=3DV005]
Other sources of [patternname][/case]
[case value=3D]
<= div>[mfrclean] [patternname][/case]
[default]
Click her= e for more info...
[/default]
[/switch]
</= a>
</font></td></tr></table>

=
--0050450180b6a53c3e04b7351171-- Associated Messages, from the most recent to the oldest:

    
  1. Re: [WebDNA] behavior of [thisurl] in the context of 'mod_rewrite' (Tom Duke 2012)
  2. Re: [WebDNA] behavior of [thisurl] in the context of 'mod_rewrite' (Govinda 2012)
  3. Re: [WebDNA] behavior of [thisurl] in the context of 'mod_rewrite' (Tom Duke 2012)
  4. Re: [WebDNA] behavior of [thisurl] in the context of 'mod_rewrite' (Govinda 2012)
  5. Re: [WebDNA] behavior of [thisurl] in the context of 'mod_rewrite' (William DeVaul 2012)
  6. Re: [WebDNA] behavior of [thisurl] in the context of 'mod_rewrite' (Tom Duke 2012)
  7. Re: [WebDNA] behavior of [thisurl] in the context of 'mod_rewrite' (Govinda 2012)
  8. Re: [WebDNA] behavior of [thisurl] in the context of 'mod_rewrite' (William DeVaul 2012)
  9. Re: [WebDNA] behavior of [thisurl] in the context of 'mod_rewrite' (Govinda 2012)
  10. Re: [WebDNA] behavior of [thisurl] in the context of 'mod_rewrite' (Govinda 2012)
  11. Re: [WebDNA] behavior of [thisurl] in the context of 'mod_rewrite' (William DeVaul 2012)
  12. Re: [WebDNA] behavior of [thisurl] in the context of 'mod_rewrite' (Govinda 2012)
  13. Re: [WebDNA] behavior of [thisurl] in the context of 'mod_rewrite' (Tom Duke 2012)
  14. Re: [WebDNA] behavior of [thisurl] in the context of 'mod_rewrite' (Govinda 2012)
  15. Re: [WebDNA] behavior of [thisurl] in the context of 'mod_rewrite' (William DeVaul 2012)
  16. Re: [WebDNA] behavior of [thisurl] in the context of 'mod_rewrite' (William DeVaul 2012)
  17. Re: [WebDNA] behavior of [thisurl] in the context of 'mod_rewrite' (Donovan Brooke 2012)
  18. Re: [WebDNA] behavior of [thisurl] in the context of 'mod_rewrite' (Govinda 2012)
  19. Re: [WebDNA] behavior of [thisurl] in the context of 'mod_rewrite' (Donovan Brooke 2012)
  20. Re: [WebDNA] behavior of [thisurl] in the context of 'mod_rewrite' (William DeVaul 2012)
  21. Re: [WebDNA] behavior of [thisurl] in the context of 'mod_rewrite' (Govinda 2012)
  22. Re: [WebDNA] behavior of [thisurl] in the context of 'mod_rewrite' (Donovan Brooke 2012)
  23. Re: [WebDNA] behavior of [thisurl] in the context of 'mod_rewrite' (Govinda 2012)
  24. Re: [WebDNA] behavior of [thisurl] in the context of 'mod_rewrite' (Govinda 2012)
  25. Re: [WebDNA] behavior of [thisurl] in the context of 'mod_rewrite' (William DeVaul 2012)
  26. Re: [WebDNA] behavior of [thisurl] in the context of 'mod_rewrite' (Govinda 2012)
  27. Re: [WebDNA] behavior of [thisurl] in the context of 'mod_rewrite' (christophe.billiottet@webdna.us 2012)
  28. [WebDNA] behavior of [thisurl] in the context of 'mod_rewrite' (Govinda 2012)
--0050450180b6a53c3e04b7351171 Content-Type: text/plain; charset=ISO-8859-1 Here is a link to a live page with a URL that is totally rewritten to provide page content: http://www.connectedcollector.com/replacements/Arabia_Of_Finland_China/Paju.htm The href in the link at the bottom of the page that reads "Click here for more info" is the result of a [thisurl]. I assure you that there is no directory for "Arabia_Of_Finland_China or a file named Paju.htm. Bill If you really want to dig into this, here is the rewrite: RewriteEngine On #permanent redirect of urls with _-_ to a conforming hyphenless url RewriteRule ^/replacements/(.*)(_-_)(.*).htm /replacements/$1_$3.htm [R=301] RewriteRule ^/replacements/(.*)-(.*).htm /replacements/$1_$2.htm [R=301] #finds maker only (no number before .htm) => /replacements/search1.htm RewriteCond %{REQUEST_URI} !/index.htm RewriteRule ^/replacements/([0-9A-Za-z_]+[^0-9]).htm$ /replacements/search1.htm?manufname=$1 [L,NC] #finds maker and range => /replacements/search2.htm RewriteCond %{REQUEST_URI} !/replacements/([0-9A-Za-z_]+[^0-9]).htm$ RewriteRule ^/replacements/([0-9A-Za-z_]+)_([0-9]+).htm$ /replacements/search2.htm?manufname=$1&start=$2 [L,NC] #finds maker and pattern => /replacements/search3.htm RewriteRule ^/replacements/([^/]+)/([0-9A-Za-z_]+).htm /replacements/search3.htm?manufname=$1&patternname=$2 [L,NC] Please note that the first two lines in the rewrite end with a 301 redirect so the browser actually sends a different request to the rewritten URL. Here's a portion of the code from /replacements/search3.htm (what is run even though the browser's address is unchanged:
[thisurl]"> [switch value=[v_id]] [case value=V001] [mfrclean] [patternname] [mfrsuffix] [/case] [case value=V002] Find more [patternname] by [mfrclean] [/case] [case value=V003] Locate pieces in [mfrclean] [mfrsuffix] [/case] [case value=V004] More [mfrclean] [patternname] information can be found here. [/case] [case value=V005] Other sources of [patternname][/case] [case value=] [mfrclean] [patternname][/case] [default] Click here for more info... [/default] [/switch]
--0050450180b6a53c3e04b7351171 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Here is a link to a live page with a URL that is totally rewritten to = provide page content:

http://www.connec= tedcollector.com/replacements/Arabia_Of_Finland_China/Paju.htm

The href in the link at the bottom of the page that rea= ds "Click here for more info" is the result of a [thisurl]. =A0I = assure you that there is no directory for "Arabia_Of_Finland_China or = a file named Paju.htm. =A0

Bill

If you really want to dig= into this, here is the rewrite:

RewriteEngin= e On

#permanent redirect of urls with _-_ to a con= forming hyphenless url
RewriteRule ^/replacements/(.*)(_-_)(.*).htm /replacements/$1_$3.htm [= R=3D301]
RewriteRule ^/replacements/(.*)-(.*).htm /replacements/$= 1_$2.htm [R=3D301]

#finds maker only (no number be= fore .htm) =3D>=A0/replacements/search1.htm
RewriteCond %{REQUEST_URI} !/index.htm
RewriteRule ^/replace= ments/([0-9A-Za-z_]+[^0-9]).htm$ /replacements/search1.htm?manufname=3D$1 [= L,NC]

#finds maker and range =3D>=A0/replacemen= ts/search2.htm
RewriteCond %{REQUEST_URI} !/replacements/([0-9A-Za-z_]+[^0-9]).htm$
RewriteRule ^/replacements/([0-9A-Za-z_]+)_([0-9]+).htm$ /replacem= ents/search2.htm?manufname=3D$1&start=3D$2 [L,NC]

<= div> #finds maker and pattern =3D> /replacements/search3.htm
Rewrit= eRule ^/replacements/([^/]+)/([0-9A-Za-z_]+).htm /replacements/search3.htm?= manufname=3D$1&patternname=3D$2 [L,NC]


Please note that the first two lines in the rewrite end with a 301 red= irect so the browser actually sends a different request to the rewritten UR= L. =A0


Here's a portion of the = code from /replacements/search3.htm (what is run even though the browser= 9;s address is unchanged: =A0

<table width=3D"580" align=3D"ce= nter"><tr><td align=3D"center">
<= ;font size=3D"-2"><a href=3D"http://www.connectedcollector.com[thisurl]"&g= t;
[switch value=3D[v_id]]
[case value=3DV001]
[mfrcl= ean] [patternname] [mfrsuffix]
[/case]
[case value=3DV0= 02]
Find more [patternname] by [mfrclean]=A0
[/case]
[case value=3DV003]
Locate pieces in [mfrclean] [mfrsuffix]
=
[/case]
[case value=3DV004]
More [mfrclean] [patte= rnname] information can be found here.
[/case]
[case va= lue=3DV005]
Other sources of [patternname][/case]
[case value=3D]
<= div>[mfrclean] [patternname][/case]
[default]
Click her= e for more info...
[/default]
[/switch]
</= a>
</font></td></tr></table>

=
--0050450180b6a53c3e04b7351171-- William DeVaul

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:

Emailer on NT not working. (1999) XML Woes Revisited (2004) orderfile and setlineitems (1998) Large databases in WebCat (1997) Sendmail Excel attachment (2003) Webmerch Error (1998) Template Security error (1997) Dummy Form Variables Needed (2000) WebCat2 beta 11 - new prefs ... (1997) WebCat2 - [format thousands] (1997) Country & Ship-to address & other fields ? (1997) [input] [/input] (1997) WebCat2: Formulas.db question (1997) Security Question (1997) default value from Lookup (was Grant, please help me) (1997) WebCatalog 3.0 manual in binder (1998) Credit Card Number checking (1997) WebCatalog 402rc2 is now available (2001) Show shoppingcart after remove last item (1997) using showpage and showcart commands (1996)