#50 content/file regeneration

open
Jeffrey Hobbs
None
5
2003-08-31
2003-08-15
Markus Elfring
No

Does your server support an automatic content regeneration
mechanism like the apache web
(http://httpd.apache.org/docs-
2.1/mod/mod_rewrite.html)?
Is there a rule or condition
available to make it possible to react on the event "missing or
invalid file" by a script?

Discussion

  • Markus Elfring
    Markus Elfring
    2003-08-31

    • assigned_to: nobody --> hobbs
     
  • Markus Elfring
    Markus Elfring
    2003-08-31

    Logged In: YES
    user_id=572001

    How do you think about this topic?

     
  • Stephen
    Stephen
    2004-07-14

    Logged In: YES
    user_id=87254

    Register a 'redirect'.

    ns_section "ns/server/${servicename}/redirects"
    ns_param 404 /404-handler.tcl

    This will run whenever the originaly requested page was not
    found. You can determine the original request via [ns_conn
    request], and regenerate your content or do whatever else
    you need...

     
  • Markus Elfring
    Markus Elfring
    2004-07-15

    Logged In: YES
    user_id=572001

    I do not want to process all requests for missing files by this
    handler.
    Can a pattern be specified for this rewrite rule?

     
  • Stephen
    Stephen
    2004-07-15

    Logged In: YES
    user_id=87254

    No.

    However with little extra effort you could match against the
    request manualy. If it's something you're interested in,
    regenerate the content, otherwise ns_returnnotfound.

     
  • Markus Elfring
    Markus Elfring
    2004-07-15

    Logged In: YES
    user_id=572001

    Would more users like that support for such patterns will be
    added for rewrite rules?