Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

About page and Contact page are generating 404 #1432

Closed
willingc opened this issue Sep 23, 2014 · 6 comments
Closed

About page and Contact page are generating 404 #1432

willingc opened this issue Sep 23, 2014 · 6 comments

Comments

@willingc
Copy link
Member

Thanks @treyhunner for the report.

@paulproteus - perhaps from latest changes :(

@treyhunner
Copy link

Contact page link has the same problem.

Looks like /about/ and /contact/ are hard coded. See here

Using the {% url %} template tag should help most problems like this. Functional tests for link checking would help also. Just speaking generally because I'm not yet familiar with the code base.

@willingc willingc changed the title About page is generating a 404 About page and Contact page are generating 404 Sep 23, 2014
@willingc
Copy link
Member Author

@treyhunner thanks. there's been recent upgrades from Django 1.3 to current version. +1 on the functional tests for link checking.

@paulproteus
Copy link
Contributor

Yeah -- one other thing going on is that we (used to...) have an Apache redirect creating a redirect here, from /about/ to https://openhatch.org/wiki/About_OpenHatch and from /contact/ to https://openhatch.org/wiki/Contact

We could move those into the codebase, or I could restore the redirects. I'll try to restore the redirects tomorrow. Thanks to all y'all for noticing + filing an issue!

http://lists.openhatch.org/pipermail/devel/2014-September/003745.html may be relevant context.

@paulproteus
Copy link
Contributor

I've copied all the redirects I could find in the (older) Apache configuration into the (newer) nginx configuration. Thanks again to @willingc and @treyhunner for bringing this up!

Actually, I should be precise about that -- I only copied the ones that seemed relevant. Here's the diff:

diff --git a/nginx/most_of_openhatch.org b/nginx/most_of_openhatch.org
index b6756e7..d4587ae 100644
--- a/nginx/most_of_openhatch.org
+++ b/nginx/most_of_openhatch.org
@@ -84,6 +84,14 @@ if ($http_user_agent ~* (AhrefsBot) ) {
                break;
        }

+### Policies etc. redirects
+        rewrite ^/policies-etc/?$ https://openhatch.org/wiki/Privacy_policy permanent;
+        rewrite ^/contact/?$ https://openhatch.org/wiki/Contact permanent;
+        rewrite ^/source-code-etc/?$ https://openhatch.org/wiki/Category:Hacking_OpenHatch permanent;
+        rewrite ^/colophon/?$ https://openhatch.org/wiki/About_OpenHatch permanent;
+        rewrite ^/about/?$ https://openhatch.org/wiki/About_OpenHatch permanent;
+        rewrite ^/blog/source-code-etc/?$ https://openhatch.org/wiki/Category:Hacking_OpenHatch permanent;
+        rewrite ^/blog/about/?$ https://openhatch.org/wiki/About_OpenHatch permanent;

        location / {
                proxy_set_header Host $host;
@@ -120,7 +128,6 @@ if ($http_user_agent ~* (AhrefsBot) ) {
        error_page 504 /home/deploy/milestone-a/mysite/static/error-pages/504.html;
        error_page 413 /home/deploy/milestone-a/static/error-pages/413.html;

Let me know if I missed anything. @willingc if you'd be willing to test this to confirm I actually fixed it, and only then close the bug, I'd mega appreciate that, just in case I messed something up.

Thanks!

@treyhunner
Copy link

👍 links work for me now

@paulproteus
Copy link
Contributor

Cool, thanks for testing @treyhunner ! I'll close now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants