Closed jasonpriem closed 12 years ago
good catch. Dario, do you know how + have time to fix this? If not, I can learn.
Heather
On Sat, Sep 24, 2011 at 12:24 AM, Jason Priem < reply@reply.github.com>wrote:
The stylesheet doesn't work for urls of the form http://total-impact.org/report/yMvCOU (the redirected form), although it does work for http://total-impact.org/report.php?id=yMvCOU.
This would be nice to fix pre-Battle, because the question-mark URLs are so 2002.
Reply to this email directly or view it on GitHub: https://github.com/mhahnel/Total-Impact/issues/40
The problem here is that we indicate the indicate the sytlesheet with a relative URL ("ui/totalimpact.css") which is interpreted by the browser as "/report/ui/totalimpact.css" in the redirected form.
One quick fix could be to indicate the style sheet with the absolute URL ("http://total-impact.org/ui/totalimpact.css")
Followed another solution course and just updated .htaccess RewriteRule to redirect the stylesheet (and others) relative URLs used within report.php to the right resource
Specifically, added the following after the URL pretty report rewrite rule: RewriteRule ^report/(.+) /$1 [r=301,nc]
Fixed the fix. The final version of the Rewriting rules in .htaccess file is. Added the L flag to stop mod_rewrite rewriting the URL with the following and overlapping rules: RewriteEngine on RewriteRule ^report/([0-9a-zA-Z]+)$ /report.php?id=$1 [L]
RewriteRule ^report/([0-9a-zA-Z]+)/(.+)$ /$1/$2 [R=301,NC,L] RewriteRule ^report/(.+)$ /$1 [R=301,NC,L]
The stylesheet doesn't work for urls of the form http://total-impact.org/report/yMvCOU (the redirected form), although it does work for http://total-impact.org/report.php?id=yMvCOU.
This would be nice to fix pre-Battle, because the question-mark URLs are so 2002.