Closed Bug 560702 Opened 14 years ago Closed 14 years ago

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

Categories

(support.mozilla.org :: Search, defect)

defect
Not set
major

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: stephend, Assigned: jsocol)

References

()

Details

(Whiteboard: [k])

Attachments

(1 file, 2 obsolete files)

Whiteboard: [k]
Summary: /k/en-US/search/ returns a 500 → /k/en-US/search/ returns a 500 Internal Server Error
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
Summary: /k/en-US/search/ returns a 500 Internal Server Error → [k] /k/en-US/search/ returns a 500 Internal Server Error
Attached patch tweak htaccess (obsolete) — Splinter Review
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-
The actual redirection here takes place in Kitsune, not in .htaccess. I'm working on nailing down why this particular issue happens.
Attached patch htaccess patch (obsolete) — Splinter Review
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.
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+
r66519 on trunk.
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
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.

Attachment

General

Created:
Updated:
Size: