[PLUG] http -> https redirect

Robert Anderson riznob at gmail.com
Wed Jul 27 18:05:57 UTC 2005


On 7/27/05, Robert McIntosh <mcintoshrt at gmail.com> wrote:
> Hi,
> 
> I'm trying to get apache to redirect http requests on a subdirectory,
> say http://www.mysite.com/subdir to redirect it to
> https://www.mysite.com/subdir.
> 
> I've found a nice .htaccess statement to put in the ./subdir directory:
> 
> <IfModule !mod_ssl.c>
> Redirect permanent / https://www.mysite.com/
> </IfModule>
> 
> Apache (2.0.x) isn't paying attention to it, even though in httpd.conf
> AllowOverride is set to "All".
> 
> This seems like a fairly typical thing to have to do, yet I'm stumped.
> 
> Please help.
> 
> TIA,
> Robert
> 
> --
> Robert McIntosh
> mcintoshrt at gmail.com
> _______________________________________________
> PLUG mailing list
> PLUG at lists.pdxlinux.org
> http://lists.pdxlinux.org/mailman/listinfo/plug
> 

I would put the redirect into the httpd.conf file. But if you must use
the .htaccess file, be sure to indlude the proper AllowOverride
directive in httpd.conf to allow this redirect. I'm not sure what this
would be. Perhaps AllowOverride All would work.

-- 
Rob Anderson
riznob at gmail.com



More information about the PLUG mailing list