sozialhelden / wheelmap-classic

:wheelchair: Legacy "classic" wheelmap.org (deprecated)
http://www.wheelmap.org
GNU Affero General Public License v3.0
47 stars 16 forks source link

All htaccess redirects via wordpress server end up on /map #426

Closed holgerd closed 7 years ago

holgerd commented 7 years ago

Dennis from our wordpress hoster added htaccess rules to redirect some URLs (see list as google spreadsheet) (due to structural changes in our blog).

Example: http://community.wheelmap.org/impressum/nutzungsbedingungen/ shall redirect to http://news.wheelmap.org/nutzungsbedingungen/

He said he added the htaccess rules. But now all those URLs redirect to this URL: https://wheelmap.org/map#/?zoom=14 .

My hunch is that it is related to "the stupid proxy rule" as @Xylakant describes in #411 :

URLs that get handled by the wheelmap app are whitelisted, everything that is not on the list gets proxied to community.wheelmap.org for historic reason (*). Anything ending in /new triggers wordpress' helpful "I'll guess what you meant even though you never asked me to" feature which picks the first article starting with "new" and redirects there.

So the quick fix is whitelist any of those url prefixes, the long-term fix is drop the stupid proxy rule.

(*) back when we had the front page delivered from the community server, but couldn't have the domain apex point there.

holgerd commented 7 years ago

@Svenyo fyi since you are in touch with Dennis.

Xylakant commented 7 years ago

no, that's not related to that. the rule is that anything that is not explicitly mapped to the rails app gets proxied through to community.wheelmap.org. so it can't end up on /map

Xylakant commented 7 years ago

well, the bug is that community.wheelmap.org redirects straight to https://wheelmap.org/map:

curl -v http://community.wheelmap.org/impressum/nutzungsbedingungen/
*   Trying 104.25.12.112...
* TCP_NODELAY set
* Connected to community.wheelmap.org (104.25.12.112) port 80 (#0)
> GET /impressum/nutzungsbedingungen/ HTTP/1.1
> Host: community.wheelmap.org
> User-Agent: curl/7.50.3
> Accept: */*
>
< HTTP/1.1 302 Moved Temporarily
< Date: Fri, 07 Oct 2016 08:26:37 GMT
< Transfer-Encoding: chunked
< Connection: keep-alive
< Set-Cookie: __cfduid=d11534e29ee82b3d0d4e7fb9da180bc611475828797; expires=Sat, 07-Oct-17 08:26:37 GMT; path=/; domain=.wheelmap.org; HttpOnly
< Cache-Control: private, max-age=0, no-store, no-cache, must-revalidate, post-check=0, pre-check=0
< Expires: Thu, 01 Jan 1970 00:00:01 GMT
< Location: https://wheelmap.org/map
< Server: cloudflare-nginx
< CF-RAY: 2edff821068a2d8f-TXL
<
* Curl_http_done: called premature == 0
* Connection #0 to host community.wheelmap.org left intact
Xylakant commented 7 years ago

did anybody touch the cloudflare rules? There are rules missing that relate to community.wheelmap.org

Hoverbear commented 7 years ago

@Xylakant Might be related to https://sozialhelden.slack.com/archives/wheelmap/p1475749888000041 ?

holgerd commented 7 years ago

@Hoverbear this bug is about a week old (forgot to mention that), so the recent changes made by @thermann78 yesterday are not the cause.

Xylakant commented 7 years ago

@holgerd but the rules that @thermann78 refers to used to relate to community IIRC even though he explicitly refers to news. There were never any page rules for news except the one I created (and which still exists)

We're also missing more than 3 rules.

Xylakant commented 7 years ago

i recreated the relevant rules, things are working fine now. some cache-related weirdness is still to be expected as long as your browser still has the cached redirects. please test in a browser that you haven't used before to test this.