Mobile app version of vmapp.org
Login or Join
Chiappetta492

: Firefox "The page isn’t redirecting properly" for a Wiki (all other Pages and UAs are OK) We are having trouble with a website for a free and open source project. The website and its three

@Chiappetta492

Posted in: #Firefox #Mediawiki #ModRewrite #Php

We are having trouble with a website for a free and open source project. The website and its three components are as follows. Its running on a CenOS 7 VM hosted by someone else (PaaS).


site: cryptopp.com (apache)
manual: cryptopp.com/docs (doxygen)
wiki: cryptopp.com/wiki (mediawiki)


The Apache version is Apache/2.4.6 (CentOS). The PHP version is 5.4.16 (cli) (built: Aug 11 2016 21:24:59). The Mediawiki version is 1.26.4.

The main site is OK and can be reached through both cryptopp.com and cryptopp.com in all browsers and user agents. The manual is OK and can be reached through both cryptopp.com/docs and cryptopp.com/docs in all browsers and user agents.

The wiki is OK under most Browsers and all tools. Safari is OK. Internet Explorer is OK. Chrome is untested because I don't use it. Command line tools like cURL and wget are OK. A trace using wget is below.

The wiki is a problem under Firefox. It cannot be reached at either cryptopp.com/wiki and cryptopp.com/wiki in Firefox. Firefox displays an error on both OS X 10.8 and Windows 8. Firefox is fully patched to the platform. The failure is:



We know the problem is due to a recent change to direct all traffic to HTTPS. The relevant addition to httd.conf is below. The change in our policy is due to Chrome's upcoming policy change regarding Security UX indicators.

I know these are crummy questions (none of us are webmasters or admins in our day job)... What is the problem? How do I troubleshoot it? How do I fix it?



wget trace

$ wget cryptopp.com/wiki/
--2016-11-05 12:53:54-- cryptopp.com/wiki/ Resolving cryptopp.com (cryptopp.com)... 192.210.150.121
Connecting to cryptopp.com (cryptopp.com)|192.210.150.121|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: www.cryptopp.com/wiki/ [following]
--2016-11-05 12:53:54-- www.cryptopp.com/wiki/ Resolving cryptopp.com (www.cryptopp.com)... 192.210.150.121
Connecting to cryptopp.com (www.cryptopp.com)|192.210.150.121|:443... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: cryptopp.com/wiki/Main_Page [following]
--2016-11-05 12:53:54-- cryptopp.com/wiki/Main_Page Connecting to cryptopp.com (cryptopp.com)|192.210.150.121|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: ‘index.html’

index.html [ <=> ] 20.04K --.-KB/s in 0.03s

2016-11-05 12:53:54 (767 KB/s) - ‘index.html’ saved [20520]




Firefox access_log

# tail -16 /var/log/httpd/access_log
<removed irrelevant entries>
71.244.244.203 - - [05/Nov/2016:13:00:52 -0400] "GET /wiki/Main_Page HTTP/1.1" 302 20 "https://www.cryptopp.com/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:48.0) Gecko/20100101 Firefox/48.0"
71.244.244.203 - - [05/Nov/2016:13:00:52 -0400] "GET /wiki/Main_Page HTTP/1.1" 302 20 "https://www.cryptopp.com/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:48.0) Gecko/20100101 Firefox/48.0"
71.244.244.203 - - [05/Nov/2016:13:00:53 -0400] "GET /wiki/Main_Page HTTP/1.1" 302 20 "https://www.cryptopp.com/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:48.0) Gecko/20100101 Firefox/48.0"
71.244.244.203 - - [05/Nov/2016:13:00:53 -0400] "GET /wiki/Main_Page HTTP/1.1" 302 20 "https://www.cryptopp.com/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:48.0) Gecko/20100101 Firefox/48.0"
71.244.244.203 - - [05/Nov/2016:13:00:53 -0400] "GET /wiki/Main_Page HTTP/1.1" 302 20 "https://www.cryptopp.com/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:48.0) Gecko/20100101 Firefox/48.0"
71.244.244.203 - - [05/Nov/2016:13:00:53 -0400] "GET /wiki/Main_Page HTTP/1.1" 302 20 "https://www.cryptopp.com/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:48.0) Gecko/20100101 Firefox/48.0"
71.244.244.203 - - [05/Nov/2016:13:00:53 -0400] "GET /wiki/Main_Page HTTP/1.1" 302 20 "https://www.cryptopp.com/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:48.0) Gecko/20100101 Firefox/48.0"
71.244.244.203 - - [05/Nov/2016:13:00:53 -0400] "GET /wiki/Main_Page HTTP/1.1" 302 20 "https://www.cryptopp.com/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:48.0) Gecko/20100101 Firefox/48.0"
71.244.244.203 - - [05/Nov/2016:13:00:53 -0400] "GET /wiki/Main_Page HTTP/1.1" 302 20 "https://www.cryptopp.com/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:48.0) Gecko/20100101 Firefox/48.0"
71.244.244.203 - - [05/Nov/2016:13:00:54 -0400] "GET /wiki/Main_Page HTTP/1.1" 302 20 "https://www.cryptopp.com/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:48.0) Gecko/20100101 Firefox/48.0"
71.244.244.203 - - [05/Nov/2016:13:00:54 -0400] "GET /wiki/Main_Page HTTP/1.1" 302 20 "https://www.cryptopp.com/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:48.0) Gecko/20100101 Firefox/48.0"




httd.conf change

<VirtualHost *:80>
ServerName cryptopp.com ServerAlias *.cryptopp.com *.cryptopp.* cryptopp.com

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_METHOD} ^TRACE
RewriteRule .* - [F]
RewriteCond %{REQUEST_METHOD} ^TRACK
RewriteRule .* - [F]

#redirect all port 80 traffic to 443
RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^/?(.*) www.cryptopp.com/ [L,R]
</IfModule>
</VirtualHost>

<VirtualHost *:443>
ServerName cryptopp.com ServerAlias *.cryptopp.com *.cryptopp.* cryptopp.com
</VirtualHost>

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Chiappetta492

1 Comments

Sorted by latest first Latest Oldest Best

 

@Eichhorn148

Browsers (including Firefox) sometimes cache the fact that a URL redirects. If you have changed your rewrite rules, make sure you clear the cache in the browser before re-testing. (Although you wouldn't usually see evidence in your server log in that case.)

As for how to investigate, I use Live HTTP Headers extension for Firefox to figure out what HTTP(S) requests are actually being made by Firefox in situations like this.

I think in your case you may have had a 301 redirect configured at one point from /wiki/Main_Page to /wiki/. Firefox got that permanent redirect into it's cache. Then later when it got /wiki/ it found that was a 302 redirect to /wiki/Main_Page. 302 temporary redirects are not cached, so it was doing:


Fetch from server /wiki/, 302 to /wiki/Main_Page
Fetch from cache /wiki/Main_Page, 301 to /wiki/
Fetch from server /wiki/, 302 to /wiki/Main_Page
Fetch from cache /wiki/Main_Page, 301 to /wiki/
Fetch from server /wiki/, 302 to /wiki/Main_Page
Fetch from cache /wiki/Main_Page, 301 to /wiki/
...
Error, infinite redirect

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme