[BlueOnyx:11737] Using rewrite in .htaccess file with SSL enabled

Robert Fitzpatrick robert at webtent.org
Fri Nov 30 22:32:40 -05 2012


I have SSL enabled on a site and want to add rewrite directives in the
site .htaccess file to force https on a sub folder like this...

RewriteEngine On
RewriteCond %{SERVER_PORT} !443$
RewriteRule ^/order/(.*)$ https://www.enzyscience.com/order/$1 [R,L]

Seems to ignore rewrite directives unless I add this to a sites include
file in the httpd conf file for the vhost...

<Directory /home/.sites/148/site6/web/>
        Options All
        AllowOverride All
        Order allow,deny
        Allow from all
</Directory>

With this type of setup on my SSL site, I get the an error...

Starting httpd: Syntax error on line 5 of /etc/httpd/conf.d/ssl_perl.conf:
$parms->add_config() has failed: Option All not allowed here at
/usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi/Apache2/PerlSections.pm
line 203.\n

If I remove the 'Options All', Apache restarts fine. Is there a way to
get these directives to work in the sites .htaccess file?

Thanks, Robert



More information about the Blueonyx mailing list