Re: URL problem

This WebDNA talk-list message is from

2007


It keeps the original formatting.
numero = 68413
interpreted = N
texte = I would greatly prefer to do that, but I can't seem to get it configured properly. It only handles page. ending in .tpl or .tmpl. Although I have set the WebDNA prefs to process all pages, apache returns the standard error dialog for everything other than .tpl or .tmpl which do return the ErrorMessages.db record. I'm also worried that, because the types of URLs I'm handling have no extensions (http://www.domain.com/ data_here_separated_by_underscores), that they will bypass WebDNA altogether. I'm not sure how that works. On Feb 4, 2007, at 9:07 PM, Stuart Tremain wrote: > Have you thought about modifying the errors.db ? > > On 05 Feb 2007, at 1:20 PM, Pat McCormick wrote: > >> I need the syntax for a rewite rule that will replace any URL >> containing an underscore (_) to index.tpl and will also pass the >> URL that the user entered to index.tpl >> >> Would this .htaccess file work?: >> >> RewriteEngine ON >> RewriteRule ^_ /index.tpl?referrer=%{REQUEST_URI} >> >> >> On Feb 4, 2007, at 5:18 PM, Tom Duke wrote: >> >>> Pat, >>> >>> I do this using mod-rewrite and a .htaccess file that rewrites all >>> requests to to WebDNA page that then parses the URL and performs >>> searches and includes etc. >>> >>> Code is below, you'll obviously have to customise it to your >>> setup. One >>> other thing - I also have to have a blank 'index.html' file in >>> the root >>> of the site for this to work - could never figure out why. >>> >>> - Tom >>> >>> >>> .htaccess >>> ----------------------- >>> RewriteEngine On >>> RewriteRule ^admin/.*$ - [L] >>> RewriteRule ^common/.*$ - [L] >>> RewriteRule ^data/.*$ - [L] >>> RewriteRule ^download/.*$ - [L] >>> RewriteRule ^imglibrary/.*$ - [L] >>> RewriteRule ^filelibrary/.*$ - [L] >>> RewriteRule ^upload/.*$ - [L] >>> RewriteCond %{REQUEST_URI} !parser\.tmpl >>> RewriteCond %{REQUEST_URI} !\.(gif|jpg|png|css|ico) >>> RewriteRule ^(.+)$ /parser.tmpl?requestedurl=%{REQUEST_URI} [L] >>> >>> parser.tmpl >>> --------------- >>> [!] >>> [/!][!] >>> >>> ------------------------------------ >>> ### Parse search parameters from the request string ### >>> [/!][listwords >>> words=[url][requestedurl][/url]&delimiters=/.][text]param[index]= >>> [word][ >>> /text][/listwords][!] >>> >>> ------------------------------------ >>> ### Match 'param1' to the 'areaid' variable ### >>> [/!][switch value=[param1]][!] >>> [/!][case value=][text]areaid=[lookup >>> db=data/db_content/ >>> coreNav.db&value=index&lookinfield=FAREA&returnfield= >>> RID¬found=dud1][/text][/case][!] >>> [/!][case value=[raw][param1][/raw]][text]areaid=[lookup >>> db=data/db_content/ >>> coreNav.db&value=index&lookinfield=FAREA&returnfield= >>> RID¬found=dud2][/text][/case][!] >>> [/!][default][text]areaid=[lookup >>> db=data/db_content/coreNav.db&value=[param1] >>> &lookinfield=FAREA&returnfie >>> ld=RID¬found=dud3][/text][/default][!] >>> [/!][/switch][!] >>> >>> ------------------------------------ >>> ### Match 'param2' to the 'section' variable ### >>> [/!][switch value=[param2]][!] >>> [/!][case value=][text]section=index[/text][/case][!] >>> [/!][case >>> value=[raw][param2][/raw]][text]section=index[/text][/case][!] >>> [/!][case value=html][text]section=index[/text][/case][!] >>> [/!][case value=tmpl][text]section=index[/text][/case][!] >>> [/!][default][text]section=[param2][/text][/default][!] >>> [/!][/switch][!] >>> >>> ------------------------------------ >>> ### Call in the 'index.inc' includes file ### >>> [/!][include >>> file=common/includes/site_index.inc&areaid=[areaid]§ion= >>> [section]] >>> >>> >>> >>> ------------------------------------------------------------- >>> 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 >> digest@talk.smithmicro.com> >>> Web Archive of this list is at: http://webdna.smithmicro.com/ >>> >> >> >> ------------------------------------------------------------- >> 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 > digest@talk.smithmicro.com> >> Web Archive of this list is at: http://webdna.smithmicro.com/ > > > ------------------------------------------------------------- > 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 digest@talk.smithmicro.com> > Web Archive of this list is at: http://webdna.smithmicro.com/ > ------------------------------------------------------------- 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. Re: URL problem ( Pat McCormick 2007)
  2. Re: URL problem ( Donovan Brooke 2007)
  3. Re: URL problem ( "Dan Strong" 2007)
  4. Re: URL problem ( Pat McCormick 2007)
  5. Re: URL problem ( "Tom Duke" 2007)
  6. Re: URL problem ( Pat McCormick 2007)
  7. Re: URL problem ( Stuart Tremain 2007)
  8. Re: URL problem ( Pat McCormick 2007)
  9. Re: URL problem ( Pat McCormick 2007)
  10. Re: URL problem ( Pat McCormick 2007)
  11. Re: URL problem ( "Tom Duke" 2007)
  12. Re: URL problem ( Stuart Tremain 2007)
  13. URL problem ( Pat McCormick 2007)
  14. Strange variable in url problem... (Jimmi Kristensen 2001)
I would greatly prefer to do that, but I can't seem to get it configured properly. It only handles page. ending in .tpl or .tmpl. Although I have set the WebDNA prefs to process all pages, apache returns the standard error dialog for everything other than .tpl or .tmpl which do return the ErrorMessages.db record. I'm also worried that, because the types of URLs I'm handling have no extensions (http://www.domain.com/ data_here_separated_by_underscores), that they will bypass WebDNA altogether. I'm not sure how that works. On Feb 4, 2007, at 9:07 PM, Stuart Tremain wrote: > Have you thought about modifying the errors.db ? > > On 05 Feb 2007, at 1:20 PM, Pat McCormick wrote: > >> I need the syntax for a rewite rule that will replace any URL >> containing an underscore (_) to index.tpl and will also pass the >> URL that the user entered to index.tpl >> >> Would this .htaccess file work?: >> >> RewriteEngine ON >> RewriteRule ^_ /index.tpl?referrer=%{REQUEST_URI} >> >> >> On Feb 4, 2007, at 5:18 PM, Tom Duke wrote: >> >>> Pat, >>> >>> I do this using mod-rewrite and a .htaccess file that rewrites all >>> requests to to WebDNA page that then parses the URL and performs >>> searches and includes etc. >>> >>> Code is below, you'll obviously have to customise it to your >>> setup. One >>> other thing - I also have to have a blank 'index.html' file in >>> the root >>> of the site for this to work - could never figure out why. >>> >>> - Tom >>> >>> >>> .htaccess >>> ----------------------- >>> RewriteEngine On >>> RewriteRule ^admin/.*$ - [L] >>> RewriteRule ^common/.*$ - [L] >>> RewriteRule ^data/.*$ - [L] >>> RewriteRule ^download/.*$ - [L] >>> RewriteRule ^imglibrary/.*$ - [L] >>> RewriteRule ^filelibrary/.*$ - [L] >>> RewriteRule ^upload/.*$ - [L] >>> RewriteCond %{REQUEST_URI} !parser\.tmpl >>> RewriteCond %{REQUEST_URI} !\.(gif|jpg|png|css|ico) >>> RewriteRule ^(.+)$ /parser.tmpl?requestedurl=%{REQUEST_URI} [L] >>> >>> parser.tmpl >>> --------------- >>> [!] >>> [/!][!] >>> >>> ------------------------------------ >>> ### Parse search parameters from the request string ### >>> [/!][listwords >>> words=[url][requestedurl][/url]&delimiters=/.][text]param[index]= >>> [word][ >>> /text][/listwords][!] >>> >>> ------------------------------------ >>> ### Match 'param1' to the 'areaid' variable ### >>> [/!][switch value=[param1]][!] >>> [/!][case value=][text]areaid=[lookup >>> db=data/db_content/ >>> coreNav.db&value=index&lookinfield=FAREA&returnfield= >>> RID¬found=dud1][/text][/case][!] >>> [/!][case value=[raw][param1][/raw]][text]areaid=[lookup >>> db=data/db_content/ >>> coreNav.db&value=index&lookinfield=FAREA&returnfield= >>> RID¬found=dud2][/text][/case][!] >>> [/!][default][text]areaid=[lookup >>> db=data/db_content/coreNav.db&value=[param1] >>> &lookinfield=FAREA&returnfie >>> ld=RID¬found=dud3][/text][/default][!] >>> [/!][/switch][!] >>> >>> ------------------------------------ >>> ### Match 'param2' to the 'section' variable ### >>> [/!][switch value=[param2]][!] >>> [/!][case value=][text]section=index[/text][/case][!] >>> [/!][case >>> value=[raw][param2][/raw]][text]section=index[/text][/case][!] >>> [/!][case value=html][text]section=index[/text][/case][!] >>> [/!][case value=tmpl][text]section=index[/text][/case][!] >>> [/!][default][text]section=[param2][/text][/default][!] >>> [/!][/switch][!] >>> >>> ------------------------------------ >>> ### Call in the 'index.inc' includes file ### >>> [/!][include >>> file=common/includes/site_index.inc&areaid=[areaid]§ion= >>> [section]] >>> >>> >>> >>> ------------------------------------------------------------- >>> 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 >> digest@talk.smithmicro.com> >>> Web Archive of this list is at: http://webdna.smithmicro.com/ >>> >> >> >> ------------------------------------------------------------- >> 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 > digest@talk.smithmicro.com> >> Web Archive of this list is at: http://webdna.smithmicro.com/ > > > ------------------------------------------------------------- > 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 digest@talk.smithmicro.com> > Web Archive of this list is at: http://webdna.smithmicro.com/ > ------------------------------------------------------------- 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/ Pat McCormick

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:

Running _every_ page through WebCat ? (1997) Cart ID Duplication (2001) Webten + Webcat running smooth (1998) Associative lookup style? + bit more (1997) PIXO support (1997) possible, WebCat2.0 and checkboxes-restated (1997) Uh...can someone help me out with the b10? (1997) Hyperboard/bulletin board available (1998) pop up menu's (1998) Server Freeze (1998) WebCat editing, SiteGuard & SiteEdit (1997) Problem about [CART] number (1998) Moving Files (2000) Emailer (1998) Bug Report, maybe (1997) Problem with updating 2.1b7 -> 2.1.1 (1998) Graphic Design Freelancer Looking for Work (2002) Frames (1997) PCS Frames-Default page is solution! (1997) [WebDNA] Dynamic vertical columns (2008)