302 redirection problem

Hi,

All my pages are https.

I have a php page (report.php) and when I go there it redirects me to my root index http://www.example.com/ then it gets redirected to https://www.example.com/

Here is a Redirect Trace:

http://www.example.com/report.php


HTTP/1.1 302 Found
Date: Mon, 10 Apr 2017 23:05:27 GMT
Server: Apache
Location: http://www.example.com/
Cache-Control: max-age=31536000
Expires: Tue, 10 Apr 2018 23:05:27 GMT
Transfer-Encoding: chunked
Content-Type: text/html; charset=iso-8859-1

http://www.example.com/

HTTP/1.1 301 Moved Permanently
Date: Mon, 10 Apr 2017 23:05:27 GMT
Server: Apache
Location: https://www.example.com/
Cache-Control: max-age=31536000
Expires: Tue, 10 Apr 2018 23:05:27 GMT

Content-Type: text/html; charset=UTF-8

https://www.example.com/

HTTP/1.1 200 OK

Why is it giving my a 302 when I’m going straight to the page? It needs to not redirect me.

Here is I think the relevant part of my htaccess:

    AllowOverride None
    AllowOverrideList None
    Require all granted
    DirectoryIndex index.php
    ErrorDocument 401 default
    ErrorDocument 401 "Authorization Required"
    ErrorDocument 403 "Authorization Required"
    Options All -Indexes +FollowSymlinks
    Options All

    SSLOptions

    RewriteEngine On
    RewriteRule ^(.*)local.xml$ - [F,L]	
    RewriteCond %{HTTP_HOST} ^11\.11\.11\.111
    RewriteRule (.*) http://www.example.com/$1 [R=301,L]

    RewriteCond %{THE_REQUEST} ^.*/index.php
    RewriteRule ^(.*)index.php$ https://www.example.com/$1 [R=301,L]
 
    RewriteCond %{HTTP_HOST} ^example.com
    RewriteRule (.*) https://www.example.com/$1 [R=301,L]	
    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
    RewriteCond %{REQUEST_URI} !^/(media|skin|js)/
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-l
    RewriteRule .* index.php [L]
    RewriteCond %{HTTP_HOST} ^11\.11\.11\.111
    RewriteRule (.*) https://www.example.com/$1 [R=301,L]
    RewriteCond %{HTTP_USER_AGENT} libwww-perl.* 
    RewriteRule .* ? [F,L]

Thanks

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.