Re: [us...@httpd] Using .htaccess to force rewriting URLs to https:// works but loses any subdirectory paths. What do I need to change?

2009-06-17 Thread Igor Cicimov
Use HTTP_HOST instead SERVER_NAME RewriteCond %{HTTPS} !=on RewriteRule ^/(.*) https://%{HTTP_HOST}/$1 [R,L] The SERVER_NAME is the variable you set up in the httpd.conf file where HTTP_HOST is the variable from the client request. On 6/16/09, Justin Pasher wrote: > Bob Linkonij wrote: >> Ok, s

Re: [us...@httpd] Using .htaccess to force rewriting URLs to https:// works but loses any subdirectory paths. What do I need to change?

2009-06-15 Thread Justin Pasher
Bob Linkonij wrote: Ok, so I changed RewriteCond %{HTTPS} !=on - RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI}/$1 [R,L] + RewriteRule (.*) https://%{SERVER_NAME}/$1 [R,L] in the .htaccess file. But still when I go to http://Domain.com/subdirectory I get redirected to https

Re: [us...@httpd] Using .htaccess to force rewriting URLs to https:// works but loses any subdirectory paths. What do I need to change?

2009-06-15 Thread Bob Linkonij
Hello Justin, On Mon, Jun 15, 2009 at 2:22 PM, Justin Pasher wrote: >>        RewriteCond %{HTTPS} !=on >>        RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [R,L] >> > > You don't need to use REQUEST_URI (maybe it's not available in the context > of RewriteRule?). You can just capture t

Re: [us...@httpd] Using .htaccess to force rewriting URLs to https:// works but loses any subdirectory paths. What do I need to change?

2009-06-15 Thread Justin Pasher
Bob Linkonij wrote: [snip] Reading around alot, I made some progress by putting this in the /webroot/.htaccess file: Options +FollowSymLinks SSLOptions +StrictRequire SSLRequireSSL SSLRequire %{HTTP_HOST} eq "www.Domain.com" ErrorDocument 403 htt

[us...@httpd] Using .htaccess to force rewriting URLs to https:// works but loses any subdirectory paths. What do I need to change?

2009-06-15 Thread Bob Linkonij
Hello everybody, I'm hosting my website at a shared-host so I have control limited to using .htaccess. I just got an SSL certificate set up and want to make sure that everything at my site always uses the https://Domain.com address and the certificate. Reading around alot, I made some progress b