kohler / hotcrp

HotCRP conference review software
http://read.seas.harvard.edu/~kohler/hotcrp
Other
331 stars 113 forks source link

Allow overriding mod_rewrite check #166

Closed yakatz closed 1 month ago

yakatz commented 5 years ago

The NavigationState class checks whether to use urls without .php with this check: https://github.com/kohler/hotcrp/blob/2a1a828a8f7756a1ebd00b41a2b9c57025e51a51/lib/navigation.php#L116-L122

This doesn't work when using PHP-FPM with Apache because FPM doesn't have the apache_get_modules function. The simplest way around this might be to allow setting something like $Opt["force_rewrite"] = true; or $Opt["force_php_suffix"] = "";, but get($Opt isn't available in that class. Alternatively, maybe it could be set in an environment variable (something like $_SERVER['HOTCRP_PHP_SUFFIX']).

Happy to implement this if I can figure it out. Your thoughts? Thanks.

kohler commented 5 years ago

I think your fix is a good one. Although maybe we should DEFAULT to “no PHP suffix”.

kohler commented 1 month ago

The relevant code has changed a ton over the years and 19f631c did fix the issue.