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
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
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.
The actual redirection here takes place in Kitsune, not in .htaccess. I'm working on nailing down why this particular issue happens.
Created attachment 441902 [details] [diff] [review] htaccess patch I should warn you: I have no idea _why_ this solves the problem. But it does.
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.
Created attachment 441920 [details] [diff] [review] another htaccess patch Changed per your comment.
Comment on attachment 441920 [details] [diff] [review] another htaccess patch WFM
Attachment #441920 - Flags: review?(paulc) → review+
r66519 on trunk.
Status: NEW → RESOLVED
Last Resolved: 8 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
Verified FIXED on https://support-stage-new.mozilla.com/en-US/search
You need to log in before you can comment on or make changes to this bug.