Re: urls

This WebDNA talk-list message is from

2005


It keeps the original formatting.
numero = 63559
interpreted = N
texte = Kalin, I use mod_rewrite and WebDNA to create search engine safe urls on most = of my sites - The Irish Labour site being the biggest = (http://www.labour.ie). The .htaccess file I use is:- RewriteEngine On RewriteRule ^excludedfolders/.*$ - [L] RewriteCond %{REQUEST_URI} !parser\.tmpl RewriteCond %{REQUEST_URI} !\.(gif|jpg|png|css|ico) RewriteRule ^(.+)$ /parser.tmpl?requestedurl=3D%{REQUEST_URI} [L] Include a line replacing 'excludedfolders' for each directory you do not = want rewritten. On the 'parser.tmpl' page I strip out each search parameter from the URL = and assign a variable to it 'param1', 'param2' etc, and then I determine = which includes file to use. If no match is found for the URL I serve up = an error page which returns a 404 error using the raw command and = mimeheaders. My code is below though obviously you would have to change = it for your circumstances. Might be of some use. Regards - Tom [!] [/!][!] ------------------------------------ ### Parse search parameters from the request string ### [/!][text]parsestring=3D[middle = startafter=3D[middlestart]&endbefore=3D][requestedurl][/middle][/text][!]= [/!][listwords = words=3D[parsestring]&delimiters=3D/.][text]param[index]=3D[word][/text][= /listwords][!] ------------------------------------ ### Determine if 'param1' relates to the specific db ### [/!][showif [url][lookup = db=3Ddata/db_specific/specific.db&value=3D[param1]&lookinfield=3DDIRECTUR= L&returnfield=3DRID¬found=3Ddud][/url]!dud][text]incfile=3Dspecific[/t= ext][/showif][!] ------------------------------------ ### Determine if 'param1' relates to the content db ### [/!][showif [url][lookup = db=3Ddata/db_content/coreNav.db&value=3D[param1]&lookinfield=3DFAREA&retu= rnfield=3DRID¬found=3Ddud][/url]!dud][text]incfile=3Dcontent[/text][/s= howif][!] ------------------------------------ ### Override if 'param1' relates to youth, women or lawyers ### [/!][showif = [url][param1][/url]=3Dyouth][text]incfile=3Dyouth[/text][/showif][!] [/!][showif = [url][param1][/url]=3Dwomen][text]incfile=3Dwomen[/text][/showif][!] [/!][showif = [url][param1][/url]=3Dlawyers][text]incfile=3Dlawyers[/text][/showif][!] ------------------------------------ ### Determine which 'index' includes files ### [/!][switch value=3D[incfile]][!] [/!][case value=3Dyouth][include = file=3Dcommon/includes/youth_index.inc][/case][!] [/!][case value=3Dwomen][include = file=3Dcommon/includes/women_index.inc][/case][!] [/!][case value=3Dlawyers][include = file=3Dcommon/includes/lawyers_index.inc][/case][!] [/!][case value=3Dpeople][include = file=3Dcommon/includes/people_index.inc][/case][!] [/!][case value=3Dplaces][include = file=3Dcommon/includes/places_index.inc][/case][!] [/!][case value=3Dcontent][include = file=3Dcommon/includes/site_index.inc][/case][!] [/!][default][include file=3Dcommon/includes/error.inc][/default][!] [/!][/switch] ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. [WebDNA] Alert: Google webdna.us search - yields a page full of URLs with errors (Nices Lists 2011)
  2. Re: [WebDNA] Case-insensitive URLs (Donovan Brooke 2011)
  3. Re: [WebDNA] Case-insensitive URLs (christophe.billiottet@webdna.us 2011)
  4. Re: [WebDNA] Case-insensitive URLs (Kenneth Grome 2011)
  5. Re: [WebDNA] Case-insensitive URLs (christophe.billiottet@webdna.us 2011)
  6. [WebDNA] Case-insensitive URLs (Kenneth Grome 2011)
  7. Re: [WebDNA] Friendly urls and multipart/form-data (Marc Thompson 2011)
  8. Re: [WebDNA] Friendly urls and multipart/form-data (Govinda 2011)
  9. Re: [WebDNA] Friendly urls and multipart/form-data (Marc Thompson 2011)
  10. Re: [WebDNA] Friendly urls and multipart/form-data (Govinda 2011)
  11. Re: [WebDNA] Friendly urls and multipart/form-data (Kenneth Grome 2011)
  12. Re: [WebDNA] Friendly urls and multipart/form-data (Tom Duke 2011)
  13. Re: [WebDNA] Friendly urls and multipart/form-data (Kenneth Grome 2011)
  14. [WebDNA] Friendly urls and multipart/form-data (Tom Duke 2011)
  15. Re: [WebDNA] Pretty URLS (William DeVaul 2011)
  16. Re: [WebDNA] Pretty URLS (sgbc cebu 2011)
  17. Re: [WebDNA] Pretty URLS (Tom Duke 2011)
  18. Re: [WebDNA] Pretty URLS (William DeVaul 2011)
  19. Re: [WebDNA] Pretty URLS (Stuart Tremain 2011)
  20. Re: [WebDNA] Pretty URLS (Kenneth Grome 2011)
  21. Re: [WebDNA] Pretty URLS (Brian Fries 2011)
  22. Re: [WebDNA] Pretty URLS (Kenneth Grome 2011)
  23. Re: [WebDNA] Pretty URLS (Govinda 2011)
  24. Re: [WebDNA] Pretty URLS (Daniel Meola 2011)
  25. Re: [WebDNA] Pretty URLS ("Brian B. Burton" 2011)
  26. Re: [WebDNA] Pretty URLS (Kenneth Grome 2011)
  27. Re: [WebDNA] Pretty URLS ("Brian B. Burton" 2011)
  28. Re: [WebDNA] Pretty URLS (William DeVaul 2011)
  29. Re: [WebDNA] Pretty URLS (Kenneth Grome 2011)
  30. Re: [WebDNA] Pretty URLS (William DeVaul 2011)
  31. Re: [WebDNA] Pretty URLS (Govinda 2011)
  32. Re: [WebDNA] Pretty URLS (Kenneth Grome 2011)
  33. Re: [WebDNA] Pretty URLS (William DeVaul 2011)
  34. Re: [WebDNA] Pretty URLS (Stuart Tremain 2011)
  35. [WebDNA] Pretty URLS ("Brian B. Burton" 2011)
  36. Re: [WebDNA] Grep help - catch all URLs (Tom Duke 2010)
  37. Re: [WebDNA] Grep help - catch all URLs (Stuart Tremain 2010)
  38. [WebDNA] Re: Grep help - catch all URLs (Tom Duke 2010)
  39. [WebDNA] Grep help - catch all URLs (Tom Duke 2010)
  40. Re: [WebDNA] Clean URLS job - will pay (Dan Strong 2010)
  41. RE: [WebDNA] Clean URLS job - will pay (matthew.bohne@benetela.com 2010)
  42. Re: [WebDNA] Clean URLS job - will pay (Tom Duke 2010)
  43. Re: [WebDNA] Clean URLS job - will pay (Stuart Tremain 2010)
  44. Re: [WebDNA] Clean URLS job - will pay ("Diane Blackmore (Cohesion)" 2010)
  45. Re: [WebDNA] Clean URLS job - will pay ("Diane Blackmore (Cohesion)" 2010)
  46. Re: [WebDNA] Clean URLS job - will pay (Stuart Tremain 2010)
  47. Re: [WebDNA] Clean URLS job - will pay ("Diane Blackmore (Cohesion)" 2010)
  48. Re: [WebDNA] Clean URLS job - will pay (Stuart Tremain 2010)
  49. Re: [WebDNA] Clean URLS job - will pay ("Diane Blackmore (Cohesion)" 2010)
  50. Re: [WebDNA] Clean URLS job - will pay (Stuart Tremain 2010)
  51. Re: [WebDNA] Clean URLS job - will pay ("Diane Blackmore (Cohesion)" 2010)
  52. Re: [WebDNA] Clean URLS job - will pay (Stuart Tremain 2010)
  53. Re: [WebDNA] Clean URLS job - will pay ("Diane Blackmore (Cohesion)" 2010)
  54. Re: [WebDNA] Clean URLS job - will pay (Stuart Tremain 2010)
  55. Re: [WebDNA] Clean URLS job - will pay ("Diane Blackmore (Cohesion)" 2010)
  56. Re: [WebDNA] Clean URLS job - will pay (Matthew Bohne 2010)
  57. Re: [WebDNA] Clean URLS job - will pay (Terry Wilson 2010)
  58. Re: [WebDNA] Clean URLS job - will pay (Stuart Tremain 2010)
  59. [BULK] Re: [WebDNA] Clean URLS job - will pay (Dan Strong 2010)
  60. Re: [WebDNA] Clean URLS job - will pay ("Diane Blackmore (Cohesion)" 2010)
  61. Re: [WebDNA] Clean URLS job - will pay (Tom Duke 2010)
  62. Re: [WebDNA] Clean URLS job - will pay ("Diane Blackmore (Cohesion)" 2010)
  63. Re: [WebDNA] Clean URLS job - will pay (Matthew Bohne 2010)
  64. Re: [WebDNA] Clean URLS job - will pay (Matthew Bohne 2010)
  65. Re: [WebDNA] Clean URLS job - will pay (Kenneth Grome 2010)
  66. Re: [WebDNA] Clean URLS job - will pay (Lawrence 2010)
  67. Re: [WebDNA] Clean URLS job - will pay (Tom Duke 2010)
  68. Re: [WebDNA] Clean URLS job - will pay (Matthew Bohne 2010)
  69. Re: [WebDNA] Clean URLS job - will pay (Matthew Bohne 2010)
  70. Re: [WebDNA] Clean URLS job - will pay (Lawrence 2010)
  71. Re: [WebDNA] Clean URLS job - will pay (Tom Duke 2010)
  72. Re: [WebDNA] Clean URLS job - will pay (Tom Duke 2010)
  73. Re: [WebDNA] Clean URLS job - will pay ("Diane Blackmore (Cohesion)" 2010)
  74. Re: [WebDNA] Clean URLS job - will pay ("Diane Blackmore (Cohesion)" 2010)
  75. Re: [WebDNA] Clean URLS job - will pay (Matthew Bohne 2010)
  76. Re: [WebDNA] Clean URLS job - will pay (Tom Duke 2010)
  77. Re: [WebDNA] Clean URLS job - will pay (Diane Blackmore 2010)
  78. Re: [WebDNA] Clean URLS job - will pay (Diane Blackmore 2010)
  79. Re: [WebDNA] Clean URLS job - will pay (Matthew Bohne 2010)
  80. Re: [WebDNA] Clean URLS job - will pay (Stuart Tremain 2010)
  81. [WebDNA] Clean URLS job - will pay (Diane Blackmore 2010)
  82. RE: [WebDNA] anyone know how to enable URLs in plain text to links? ("Olin Lagon" 2009)
  83. Re: [WebDNA] anyone know how to enable URLs in plain text to links? (Donovan Brooke 2009)
  84. RE: [WebDNA] anyone know how to enable URLs in plain text to links? ("Olin Lagon" 2009)
  85. Re: [WebDNA] anyone know how to enable URLs in plain text to links? (Donovan Brooke 2009)
  86. [WebDNA] anyone know how to enable URLs in plain text to links? ("Olin Lagon" 2009)
  87. Re: MOD_REWRITE Search Engine Friendly URLs ( Stuart Tremain 2008)
  88. Re: MOD_REWRITE Search Engine Friendly URLs ( Matthew Bohne 2008)
  89. MOD_REWRITE Search Engine Friendly URLs ( Ki Song 2008)
  90. Re: Google MAP URLs ( devaulw@onebox.com 2006)
  91. Re: Google MAP URLs ( John Peacock 2006)
  92. Re: Google MAP URLs ( "Nick Griffie" 2006)
  93. Re: Google MAP URLs ( John Peacock 2006)
  94. Re: Google MAP URLs ( "Nick Griffie" 2006)
  95. Re: Google MAP URLs ( John Peacock 2006)
  96. Google MAP URLs ( "Nick Griffie" 2006)
  97. Re: urls ( "Tom Duke" 2005)
  98. Re: urls ( Clint Davis 2005)
  99. Re: urls ( John Peacock 2005)
  100. Re: urls ( devaulw@onebox.com 2005)
  101. Re: urls ( Clint Davis 2005)
  102. Re: urls ( "Nitai @ ComputerOil" 2005)
  103. Re: urls ( devaulw@onebox.com 2005)
  104. Re: urls ( "Nitai @ ComputerOil" 2005)
  105. Re: urls ( Clint Davis 2005)
  106. Re: urls ( "Nitai @ ComputerOil" 2005)
  107. Re: urls ( devaulw@onebox.com 2005)
  108. Re: urls ( Clint Davis 2005)
  109. Re: Future of WebDNA (was Re: urls) ( "Nitai @ ComputerOil" 2005)
  110. Re: Future of WebDNA (was Re: urls) ( William DeVaul 2005)
  111. OT mod_rewrite (was Re: urls) ( William DeVaul 2005)
  112. Re: urls ( "kalin mintchev" 2005)
  113. Re: Future of WebDNA (was Re: urls) ( Donovan Brooke 2005)
  114. Re: Future of WebDNA (was Re: urls) ( Stuart Tremain 2005)
  115. Re: Future of WebDNA (was Re: urls) ( devaulw@onebox.com 2005)
  116. Re: Future of WebDNA (was Re: urls) ( Donovan Brooke 2005)
  117. Future of WebDNA (was Re: urls) ( devaulw@onebox.com 2005)
  118. Re: urls ( Jesse Proudman 2005)
  119. Re: urls ( devaulw@onebox.com 2005)
  120. Re: urls ( "kalin mintchev" 2005)
  121. Re: urls ( Donovan Brooke 2005)
  122. Re: urls ( "Dan Strong" 2005)
  123. urls ( "kalin mintchev" 2005)
  124. Re: Links and urls ( Lester 2005)
  125. Re: Links and urls ( "Nitai @ ComputerOil" 2005)
  126. Links and urls ( Lester 2005)
  127. Re: encrypting without "ugly" URLs ( John Peacock 2005)
  128. Re: encrypting without "ugly" URLs ( Joe D'Andrea 2005)
  129. Re: encrypting without "ugly" URLs ( John Peacock 2005)
  130. Re: encrypting without "ugly" URLs ( John Peacock 2005)
  131. encrypting without "ugly" URLs ( Joe D'Andrea 2005)
  132. Re: Browser frames and URLs in the Location field ( Joe D'Andrea 2004)
  133. Re: Browser frames and URLs in the Location field ( Kenneth Grome 2004)
  134. Re: Browser frames and URLs in the Location field ( Glenn Busbin 2004)
  135. Re: Browser frames and URLs in the Location field ( "Sal" 2004)
  136. Re: Browser frames and URLs in the Location field ( Mark Derrick 2004)
  137. Re: Browser frames and URLs in the Location field ( Mark Derrick 2004)
  138. Re: Browser frames and URLs in the Location field ( Joe D'Andrea 2004)
  139. Re: Browser frames and URLs in the Location field ( Kenneth Grome 2004)
  140. Re: Browser frames and URLs in the Location field ( "Sal" 2004)
  141. Re: Browser frames and URLs in the Location field ( Kenneth Grome 2004)
  142. Re: Browser frames and URLs in the Location field ( "Sal" 2004)
  143. Re: Browser frames and URLs in the Location field ( Kenneth Grome 2004)
  144. Re: Browser frames and URLs in the Location field ( Kenneth Grome 2004)
  145. Re: Browser frames and URLs in the Location field ( "Sal" 2004)
  146. Re: Browser frames and URLs in the Location field ( Kenneth Grome 2004)
  147. Re: Browser frames and URLs in the Location field ( Tim Robinson 2004)
  148. Re: Browser frames and URLs in the Location field ( Frank Nordberg 2004)
  149. Re: Browser frames and URLs in the Location field ( Gary Krockover 2004)
  150. Browser frames and URLs in the Location field ( Kenneth Grome 2004)
  151. Re: Digger URLs ... ( Kenneth Grome 2004)
  152. Re: Digger URLs ... ( Palle Bo Nielsen 2004)
  153. Digger URLs ... ( Kenneth Grome 2004)
  154. Re: Code to convert relative to absolute URLs in HTML files ( "Dan Strong" 2004)
  155. Re: Code to convert relative to absolute URLs in HTML files ( William DeVaul 2004)
  156. Re: Code to convert relative to absolute URLs in HTML files ( "Dan Strong" 2004)
  157. Code to convert relative to absolute URLs in HTML files ( William DeVaul 2004)
  158. Re: Cleaner URLs (Velma Kahn 2003)
  159. Re: Cleaner URLs (Alain Russell 2003)
  160. Re: Cleaner URLs (Michael Davis 2003)
  161. Re: Cleaner URLs (Alain Russell 2003)
  162. Re: Cleaner URLs (Clint Davis 2003)
  163. Re: Cleaner URLs (Alain Russell 2003)
  164. Re: Cleaner URLs (Glenn Busbin 2003)
  165. Cleaner URLs (Clint Davis 2003)
  166. Re: New user...how do I create URLs from form fields? (Michael O Shea 2000)
  167. Re: New user...how do I create URLs from form fields? (Mike Davis 2000)
  168. Re: New user...how do I create URLs from form fields? (DMP 2000)
  169. Re: New user...how do I create URLs from form fields? (Aaron Lynch 2000)
  170. Re: New user...how do I create URLs from form fields? (Charles Kline 2000)
  171. Re: New user...how do I create URLs from form fields? (DMP 2000)
  172. Re: New user...how do I create URLs from form fields? (Kenneth Grome 2000)
  173. Re: New user...how do I create URLs from form fields? (Charles Kline 2000)
  174. New user...how do I create URLs from form fields? (DMP 2000)
  175. RE: Auto conversion of URLs? (Olin 1998)
  176. Re: Auto conversion of URLs? (Kenneth Grome 1998)
  177. Auto conversion of URLs? (Marty Schmid 1998)
  178. Re: search engine friendly URLS (Mac) and Lycos! (PCS Technical Support 1998)
  179. Fwd: Re: search engine friendly URLS (Mac) (Laurent Pladys 1998)
  180. Re: search engine friendly URLS (Mac) and Lycos! (Dale LaFountain 1998)
  181. search engine friendly URLS (Mac) (Dale Stokdyk 1998)
  182. Re: Carts & Refering URLs (John Hill 1997)
  183. Re: Carts & Refering URLs (Michael Winston 1997)
  184. Re: Carts & Refering URLs (Christer Olsson 1997)
  185. Re: Carts & Refering URLs (John Hill 1997)
  186. Carts & Refering URLs (John Benn/PetsForum Group 1997)
  187. Re: HTML encoding in URLs (Kenneth Grome 1997)
  188. Re: Netscape Communicator 4 chops off URLs (was Re: No Data) (Kenneth Grome 1997)
  189. Re: HTML encoding in URLs (Chris Gursche 1997)
  190. Netscape Communicator 4 chops off URLs (was Re: No Data) (Grant Hulbert 1997)
  191. Re: HTML encoding in URLs (Grant Hulbert 1997)
  192. Re: HTML encoding in URLs (Thomas Wedderburn-Bisshop 1997)
  193. Re: HTML encoding in URLs (Grant Hulbert 1997)
  194. Re: HTML encoding in URLs (Kenneth Grome 1997)
  195. Fwd: Re: HTML encoding in URLs (Thomas Wedderburn-Bisshop 1997)
  196. HTML encoding in URLs (Thomas Wedderburn-Bisshop 1997)
  197. Looking for 5 to 12 shops with 3 URLs & statements (Mark Rauterkus 1997)
Kalin, I use mod_rewrite and WebDNA to create search engine safe urls on most = of my sites - The Irish Labour site being the biggest = (http://www.labour.ie). The .htaccess file I use is:- RewriteEngine On RewriteRule ^excludedfolders/.*$ - [L] RewriteCond %{REQUEST_URI} !parser\.tmpl RewriteCond %{REQUEST_URI} !\.(gif|jpg|png|css|ico) RewriteRule ^(.+)$ /parser.tmpl?requestedurl=3D%{REQUEST_URI} [L] Include a line replacing 'excludedfolders' for each directory you do not = want rewritten. On the 'parser.tmpl' page I strip out each search parameter from the URL = and assign a variable to it 'param1', 'param2' etc, and then I determine = which includes file to use. If no match is found for the URL I serve up = an error page which returns a 404 error using the raw command and = mimeheaders. My code is below though obviously you would have to change = it for your circumstances. Might be of some use. Regards - Tom [!] [/!][!] ------------------------------------ ### Parse search parameters from the request string ### [/!][text]parsestring=3D[middle = startafter=3D[middlestart]&endbefore=3D][requestedurl][/middle][/text][!]= [/!][listwords = words=3D[parsestring]&delimiters=3D/.][text]param[index]=3D[word][/text][= /listwords][!] ------------------------------------ ### Determine if 'param1' relates to the specific db ### [/!][showif [url][lookup = db=3Ddata/db_specific/specific.db&value=3D[param1]&lookinfield=3DDIRECTUR= L&returnfield=3DRID¬found=3Ddud][/url]!dud][text]incfile=3Dspecific[/t= ext][/showif][!] ------------------------------------ ### Determine if 'param1' relates to the content db ### [/!][showif [url][lookup = db=3Ddata/db_content/coreNav.db&value=3D[param1]&lookinfield=3DFAREA&retu= rnfield=3DRID¬found=3Ddud][/url]!dud][text]incfile=3Dcontent[/text][/s= howif][!] ------------------------------------ ### Override if 'param1' relates to youth, women or lawyers ### [/!][showif = [url][param1][/url]=3Dyouth][text]incfile=3Dyouth[/text][/showif][!] [/!][showif = [url][param1][/url]=3Dwomen][text]incfile=3Dwomen[/text][/showif][!] [/!][showif = [url][param1][/url]=3Dlawyers][text]incfile=3Dlawyers[/text][/showif][!] ------------------------------------ ### Determine which 'index' includes files ### [/!][switch value=3D[incfile]][!] [/!][case value=3Dyouth][include = file=3Dcommon/includes/youth_index.inc][/case][!] [/!][case value=3Dwomen][include = file=3Dcommon/includes/women_index.inc][/case][!] [/!][case value=3Dlawyers][include = file=3Dcommon/includes/lawyers_index.inc][/case][!] [/!][case value=3Dpeople][include = file=3Dcommon/includes/people_index.inc][/case][!] [/!][case value=3Dplaces][include = file=3Dcommon/includes/places_index.inc][/case][!] [/!][case value=3Dcontent][include = file=3Dcommon/includes/site_index.inc][/case][!] [/!][default][include file=3Dcommon/includes/error.inc][/default][!] [/!][/switch] ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/ "Tom Duke"

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:

[WebDNA] XSS and getting rid of HTML codes (2018) RequiredFields template (1997) WebCat2 Append problem (B14Macacgi) (1997) showcart is slow (1998) Size limit for tmpl editor ? (1997) [WebDNA] MD5 Hash issue (2009) Help! (1996) question: search return in order (1997) RequiredFields template (1997) Multiple catalog databases and showcart (1997) Support ?? (1997) Searchable list archive (1997) Sorting problem (2002) Off Topic: Frames Killer? (1998) SM: Max connections exceeded clarification please (2002) Webcatalog error, Plug-in for Webstar (1996) WebCat & Liststar (1997) Mirroring WebCat Servers (2001) Purchased cart being overwritten - still !?? (1997) WebCat2b13MacPlugin - [math][date][/math] problem (1997)