performance lighttpd lua boost_module

Non-Drupal URIs and Lighttpd drupal.lua Script

I have a few other URLs that don't belong to Drupal. If these URLs are received on port 80, they get redirected to port 443 using mod_rewrite. The problem is drupal.lua script will cause non-Drupal URLs to simply get into a redirection loop. So, for example:

http://blog.example.org/nondrupalurl will send constant 301s back to the browser until it times out. What I had to do at the top of drupal.lua was this:

if lighty.env['uri.path']:match('nondrupalurl') then
--  print('URI Path Match ' .. lighty.env['uri.path'])
  return
end

So far, this solution works but it's not very elegant, especially if there are a bunch of non-Drupal URLs. My site only has two, so it's not that big of a deal to hard code this into drupal.lua.

The other thing I'd like to know is how do you do your Lua dev?

Creative Commons License
This work by Mark Schoonover is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 United States License.
Based on a work at blog.thetajoin.com. All comments copyright their respective owners.

Syndicate content
Drupal SEO