Using .htaccess and ModRewrite - (was [OT] CSS and SSI books)
This WebDNA talk-list message is from 2004
It keeps the original formatting.
numero = 57570
interpreted = N
texte = Alan,Here is the code we are using. Some of the 'parser.tmpl' code is =specific to our setup but the code to split the URL should be of some =use to you.- Tom..htaccess file------------------------------------------------------------RewriteEngine On=0DRewriteRule ^admin/.*$ - [L]=0DRewriteRule ^data/.*$ =- [L]=0DRewriteRule ^common/.*$ - [L]=0DRewriteRule ^download/.*$ - =[L]=0DRewriteCond %{REQUEST_URI} !parser\.tmpl=0DRewriteCond =%{REQUEST_URI} !\.(gif|jpg|png|css)=0DRewriteRule ^(.+)$ =/parser.tmpl?requestedurl=3D%{REQUEST_URI} [L]parser.tmpl------------------------------------------------------------[!]=0D[/!][!]=0D=0D------------------------------------=0D### Parse search parameters =from the request string ###=0D=0D[/!][text]parsestring=3D[middle =startafter=3D[middlestart]&endbefore=3D][requestedurl][/middle][/text][!]==0D[/!][listwords =words=3D[parsestring]&delimiters=3D/.][text]param[index]=3D[word][/text][=/listwords][!]=0D=0D------------------------------------=0D### Match 'param1' to the ='areaid' variable ###=0D=0D[/!][switch value=3D[param1]][!]=0D[/!][case =value=3D][text]areaid=3D[lookup =db=3Ddata/db_content/coreNav.db&value=3Dindex&lookinfield=3DFAREA&returnf=ield=3DRID¬found=3Ddud1][/text][/case][!]=0D[/!][case =value=3D[raw][param1][/raw]][text]areaid=3D[lookup =db=3Ddata/db_content/coreNav.db&value=3Dindex&lookinfield=3DFAREA&returnf=ield=3DRID¬found=3Ddud2][/text][/case][!]=0D[/!][default][text]areaid=3D=[lookup =db=3Ddata/db_content/coreNav.db&value=3D[param1]&lookinfield=3DFAREA&retu=rnfield=3DRID¬found=3Ddud3][/text][/default][!]=0D[/!][/switch][!]=0D=0D==0D------------------------------------=0D### Match 'param2' to the ='section' variable ###=0D=0D[/!][switch =value=3D[param2]][!]=0D[/!][case =value=3D][text]section=3Dindex[/text][/case][!]=0D[/!][case =value=3D[raw][param2][/raw]][text]section=3Dindex[/text][/case][!]=0D[/!]=[case value=3Dhtml][text]section=3Dindex[/text][/case][!]=0D[/!][case =value=3Dtmpl][text]section=3Dindex[/text][/case][!]=0D[/!][default][text]=section=3D[param2][/text][/default][!]=0D[/!][/switch][!]=0D=0D=0D-------=-----------------------------=0D### Call in the 'index.inc' includes =file ###=0D=0D[/!][include =file=3Dcommon/includes/index.inc&areaid=3D[areaid]§ion=3D[section]]=0D=-------------------------------------------------------------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:
|
- Using .htaccess and ModRewrite - (was [OT] CSS and SSI books) ( "Tom Duke" 2004)
|
Alan,Here is the code we are using. Some of the 'parser.tmpl' code is =specific to our setup but the code to split the URL should be of some =use to you.- Tom..htaccess file------------------------------------------------------------RewriteEngine On=0DRewriteRule ^admin/.*$ - [L]=0DRewriteRule ^data/.*$ =- [L]=0DRewriteRule ^common/.*$ - [L]=0DRewriteRule ^download/.*$ - =[L]=0DRewriteCond %{REQUEST_URI} !parser\.tmpl=0DRewriteCond =%{REQUEST_URI} !\.(gif|jpg|png|css)=0DRewriteRule ^(.+)$ =/parser.tmpl?requestedurl=3D%{REQUEST_URI} [L]parser.tmpl------------------------------------------------------------[!]=0D[/!][!]=0D=0D------------------------------------=0D### Parse search parameters =from the request string ###=0D=0D[/!][text]parsestring=3D[middle =startafter=3D[middlestart]&endbefore=3D][requestedurl][/middle][/text][!]==0D[/!][listwords =words=3D[parsestring]&delimiters=3D/.][text]param[index]=3D[word][/text][=/listwords][!]=0D=0D------------------------------------=0D### Match 'param1' to the ='areaid' variable ###=0D=0D[/!][switch value=3D[param1]][!]=0D[/!][case =value=3D][text]areaid=3D[lookup =db=3Ddata/db_content/coreNav.db&value=3Dindex&lookinfield=3DFAREA&returnf=ield=3DRID¬found=3Ddud1][/text][/case][!]=0D[/!][case =value=3D[raw][param1][/raw]][text]areaid=3D[lookup =db=3Ddata/db_content/coreNav.db&value=3Dindex&lookinfield=3DFAREA&returnf=ield=3DRID¬found=3Ddud2][/text][/case][!]=0D[/!][default][text]areaid=3D=[lookup =db=3Ddata/db_content/coreNav.db&value=3D[param1]&lookinfield=3DFAREA&retu=rnfield=3DRID¬found=3Ddud3][/text][/default][!]=0D[/!][/switch][!]=0D=0D==0D------------------------------------=0D### Match 'param2' to the ='section' variable ###=0D=0D[/!][switch =value=3D[param2]][!]=0D[/!][case =value=3D][text]section=3Dindex[/text][/case][!]=0D[/!][case =value=3D[raw][param2][/raw]][text]section=3Dindex[/text][/case][!]=0D[/!]=[case value=3Dhtml][text]section=3Dindex[/text][/case][!]=0D[/!][case =value=3Dtmpl][text]section=3Dindex[/text][/case][!]=0D[/!][default][text]=section=3D[param2][/text][/default][!]=0D[/!][/switch][!]=0D=0D=0D-------=-----------------------------=0D### Call in the 'index.inc' includes =file ###=0D=0D[/!][include =file=3Dcommon/includes/index.inc&areaid=3D[areaid]§ion=3D[section]]=0D=-------------------------------------------------------------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:
QuitFeedback & DBNotOpened errors (1997)
WebCatalog stalls (1998)
bannerads example idiot (1997)
WebCat2b13MacPlugIn - [showif][search][/showif] (1997)
Re:quit command on NT (1997)
WebCat2b12--[searchstring] bug (1997)
Trouble with carts (2000)
using cookies to prevent access (2000)
Storebuilder Quickie (2003)
HELP WITH DATES (1997)
Extended [ConvertChars] (1997)
Navigator Parsing (1997)
Emailer port change (1997)
encripted storage (1998)
New commands in Final candidate (1997)
Force a search at the default.tmpl page? (1997)
WC1.6 to WC2 date formatting (1997)
emailer w/F2 (1997)
RE: is sku a REQUIRED field on NT (1997)
RE: Webcat 2.0.1b1 bug with IE 3.01/4.0p1 (1997)