diff --git a/lib/apache/rewrites.rb b/lib/apache/rewrites.rb index 3298d08..b7649c9 100644 --- a/lib/apache/rewrites.rb +++ b/lib/apache/rewrites.rb @@ -34,6 +34,9 @@ module Apache # # r301 '/here', '/there' #=> Redirect permanent "/here" "/there" def r301(*opt) + if opt.first && !opt.first.kind_of?(::String) + raise "First parameter should be a String. Did you mean to wrap this in a rewrites block? #{opt.first}" + end self << "Redirect permanent #{quoteize(*opt) * " "}" end end