Re: URL problem
This WebDNA talk-list message is from 2007
It keeps the original formatting.
numero = 68408
interpreted = N
texte = Pat,I do this using mod-rewrite and a .htaccess file that rewrites allrequests to to WebDNA page that then parses the URL and performssearches and includes etc.Code is below, you'll obviously have to customise it to your setup. Oneother thing - I also have to have a blank 'index.html' file in the rootof the site for this to work - could never figure out why.- Tom..htaccess-----------------------RewriteEngine OnRewriteRule ^admin/.*$ - [L]RewriteRule ^common/.*$ - [L]RewriteRule ^data/.*$ - [L]RewriteRule ^download/.*$ - [L]RewriteRule ^imglibrary/.*$ - [L]RewriteRule ^filelibrary/.*$ - [L]RewriteRule ^upload/.*$ - [L]RewriteCond %{REQUEST_URI} !parser\.tmplRewriteCond %{REQUEST_URI} !\.(gif|jpg|png|css|ico)RewriteRule ^(.+)$ /parser.tmpl?requestedurl=3D%{REQUEST_URI} [L]parser.tmpl---------------[!][/!][!]=20------------------------------------ ### Parse search parameters from the request string ###[/!][listwordswords=3D[url][requestedurl][/url]&delimiters=3D/.][text]param[index]=3D[w=ord][/text][/listwords][!]=20------------------------------------ ### Match 'param1' to the 'areaid' variable ###[/!][switch value=3D[param1]][!] [/!][case value=3D][text]areaid=3D[lookupdb=3Ddata/db_content/coreNav.db&value=3Dindex&lookinfield=3DFAREA&returnf=ield=3DRID¬found=3Ddud1][/text][/case][!] [/!][case value=3D[raw][param1][/raw]][text]areaid=3D[lookupdb=3Ddata/db_content/coreNav.db&value=3Dindex&lookinfield=3DFAREA&returnf=ield=3DRID¬found=3Ddud2][/text][/case][!] [/!][default][text]areaid=3D[lookupdb=3Ddata/db_content/coreNav.db&value=3D[param1]&lookinfield=3DFAREA&retu=rnfield=3DRID¬found=3Ddud3][/text][/default][!][/!][/switch][!]=20------------------------------------ ### Match 'param2' to the 'section' variable ###[/!][switch value=3D[param2]][!] [/!][case value=3D][text]section=3Dindex[/text][/case][!] [/!][casevalue=3D[raw][param2][/raw]][text]section=3Dindex[/text][/case][!] [/!][case value=3Dhtml][text]section=3Dindex[/text][/case][!] [/!][case value=3Dtmpl][text]section=3Dindex[/text][/case][!] [/!][default][text]section=3D[param2][/text][/default][!][/!][/switch][!]=20------------------------------------ ### Call in the 'index.inc' includes file ###[/!][includefile=3Dcommon/includes/site_index.inc&areaid=3D[areaid]§ion=3D[sectio=n]]=20-------------------------------------------------------------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:
Pat,I do this using mod-rewrite and a .htaccess file that rewrites allrequests to to WebDNA page that then parses the URL and performssearches and includes etc.Code is below, you'll obviously have to customise it to your setup. Oneother thing - I also have to have a blank 'index.html' file in the rootof the site for this to work - could never figure out why.- Tom..htaccess-----------------------RewriteEngine OnRewriteRule ^admin/.*$ - [L]RewriteRule ^common/.*$ - [L]RewriteRule ^data/.*$ - [L]RewriteRule ^download/.*$ - [L]RewriteRule ^imglibrary/.*$ - [L]RewriteRule ^filelibrary/.*$ - [L]RewriteRule ^upload/.*$ - [L]RewriteCond %{REQUEST_URI} !parser\.tmplRewriteCond %{REQUEST_URI} !\.(gif|jpg|png|css|ico)RewriteRule ^(.+)$ /parser.tmpl?requestedurl=3D%{REQUEST_URI} [L]parser.tmpl---------------[!][/!][!]=20------------------------------------ ### Parse search parameters from the request string ###[/!][listwordswords=3D[url][requestedurl][/url]&delimiters=3D/.][text]param[index]=3D[w=ord][/text][/listwords][!]=20------------------------------------ ### Match 'param1' to the 'areaid' variable ###[/!][switch value=3D[param1]][!] [/!][case value=3D][text]areaid=3D[lookupdb=3Ddata/db_content/coreNav.db&value=3Dindex&lookinfield=3DFAREA&returnf=ield=3DRID¬found=3Ddud1][/text][/case][!] [/!][case value=3D[raw][param1][/raw]][text]areaid=3D[lookupdb=3Ddata/db_content/coreNav.db&value=3Dindex&lookinfield=3DFAREA&returnf=ield=3DRID¬found=3Ddud2][/text][/case][!] [/!][default][text]areaid=3D[lookupdb=3Ddata/db_content/coreNav.db&value=3D[param1]&lookinfield=3DFAREA&retu=rnfield=3DRID¬found=3Ddud3][/text][/default][!][/!][/switch][!]=20------------------------------------ ### Match 'param2' to the 'section' variable ###[/!][switch value=3D[param2]][!] [/!][case value=3D][text]section=3Dindex[/text][/case][!] [/!][casevalue=3D[raw][param2][/raw]][text]section=3Dindex[/text][/case][!] [/!][case value=3Dhtml][text]section=3Dindex[/text][/case][!] [/!][case value=3Dtmpl][text]section=3Dindex[/text][/case][!] [/!][default][text]section=3D[param2][/text][/default][!][/!][/switch][!]=20------------------------------------ ### Call in the 'index.inc' includes file ###[/!][includefile=3Dcommon/includes/site_index.inc&areaid=3D[areaid]§ion=3D[sectio=n]]=20-------------------------------------------------------------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:
Quit revisited (1997)
possible, WebCat2.0 and checkboxes-restated (1997)
[WebDNA] New Mountain Lion OSX Server (2013)
[WebDNA] encrypt files/directories (2011)
webcat method for waiting specific amount of time? (2000)
Sort Order on a page search (1997)
Nested tags count question (1997)
Practice runs ? (1997)
Shipcost formula (2004)
Renumbering Database Records (1999)
Progress !! WAS: Trouble with formula.db (1997)
more ! testing (1997)
bad idea to not use any html files, only .tpl files? (1999)
HELP WITH DATES (1997)
Merging databases (1997)
[date] problem with %d%m%Y (1998)
docs for WebCatalog2 (1997)
Help with Shipping Costs (1997)
WCS Newbie question (1997)
trouble updating records in database (1998)