[k] /en-US/search/ returns a 500 Internal Server Error

VERIFIED FIXED in 1.5.4

Status

support.mozilla.org
Search
--
major
VERIFIED FIXED
8 years ago
8 years ago

People

(Reporter: stephend, Assigned: jsocol)

Tracking

unspecified
1.5.4

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [k], URL)

Attachments

(1 attachment, 2 obsolete attachments)

(Reporter)

Description

8 years ago
https://support-stage-new.mozilla.com/k/en-US/search/ yields a 500 Internal Server

https://support-stage-new.mozilla.com/k/en-US/search (without the trailing slash) works
(Reporter)

Updated

8 years ago
Whiteboard: [k]
(Reporter)

Updated

8 years ago
Summary: /k/en-US/search/ returns a 500 → /k/en-US/search/ returns a 500 Internal Server Error
(Assignee)

Comment 1

8 years ago
We're actually going to fix this in .htaccess, not Django, so 2.0 => 1.5.4.
Assignee: nobody → james
Target Milestone: 2.0 → 1.5.4
(Reporter)

Updated

8 years ago
Summary: /k/en-US/search/ returns a 500 Internal Server Error → [k] /k/en-US/search/ returns a 500 Internal Server Error
(Assignee)

Comment 2

8 years ago
Created attachment 441515 [details] [diff] [review]
tweak htaccess

Cleans up the .htaccess file (I'd accidentally left some extraneous $1s and $2s in there) and adds /? to the end of the Kitsune URLs. They still map to no-trailing-slash internally, and /k/en-US/search/ will still fail, but bug 561537 will make those redirect back to no trailing slash.
Attachment #441515 - Flags: review?(paulc)
Comment on attachment 441515 [details] [diff] [review]
tweak htaccess

One comment, hitting:
/search/
Doesn't work. It takes me to:
http://www.en-us.com/search
The rest looks good.
Attachment #441515 - Flags: review?(paulc) → review-
(Assignee)

Comment 4

8 years ago
The actual redirection here takes place in Kitsune, not in .htaccess. I'm working on nailing down why this particular issue happens.
(Assignee)

Comment 5

8 years ago
Created attachment 441902 [details] [diff] [review]
htaccess patch

I should warn you: I have no idea _why_ this solves the problem. But it does.
Attachment #441515 - Attachment is obsolete: true
Attachment #441902 - Flags: review?(paulc)
Comment on attachment 441902 [details] [diff] [review]
htaccess patch

>Index: webroot/htaccess.dist
>===================================================================
>--- webroot/htaccess.dist	(revision 66511)
>+++ webroot/htaccess.dist	(working copy)
>+RewriteRule ^search(.)$ /k/search$1 [L,QSA]
So I think just doing (/)? is enough. I couldn't figure out why /? doesn't work in this case. Seems like an escaping issue but wtf? So:
RewriteRule ^search(/)?$ /k/search$1 [L,QSA]
... worked for me.
(Assignee)

Comment 7

8 years ago
Created attachment 441920 [details] [diff] [review]
another htaccess patch

Changed per your comment.
Attachment #441902 - Attachment is obsolete: true
Attachment #441920 - Flags: review?(paulc)
Attachment #441902 - Flags: review?(paulc)
Comment on attachment 441920 [details] [diff] [review]
another htaccess patch

WFM
Attachment #441920 - Flags: review?(paulc) → review+
(Assignee)

Comment 9

8 years ago
r66519 on trunk.
Status: NEW → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → FIXED
(Assignee)

Comment 10

8 years ago
I should point out: we did not fix this for URLs with /k in them. Those are still 404 errors in Django. However, no one should be going to URLs with /k in them.

See bug 561537 for handling this sort of thing in Django itself.
Summary: [k] /k/en-US/search/ returns a 500 Internal Server Error → [k] /en-US/search/ returns a 500 Internal Server Error
You need to log in before you can comment on or make changes to this bug.