httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kurtis Rader <kra...@skepticism.us>
Subject Re: [users@httpd] ReDirect question
Date Sun, 28 Jun 2015 00:32:23 GMT
On Sat, Jun 27, 2015 at 4:45 PM, James Moe <jimoe@sohnen-moe.com> wrote:

> ----[ from the vhost file ]----
> <VirtualHost *:80>
> ...
>  <Directory "/data01/t-drv/websites/sma-v3">
>      # Always use a secure connection
>     RewriteEngine On
>     RewriteCond %{SERVER_PORT} =80
>     RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R,L]
>

That rewrite rule should retain the query string. Have you tested whether
the .htaccess rewrite works if you make the initial connection over https?

Try adding another rewrite rule to the .htaccess. For example,

RewriteCond %{QUERY_STRING} =testing=123
RewriteRule ^ . [F]

If you then issue a "GET /category/?testing=123" do you get a 403 Forbidden
status in response?

-- 
Kurtis Rader
Caretaker of the exceptional canines Junior and Hank

Mime
View raw message