I am deploying ojs 3.3.0-20 on ovh.
I had a problem with css when trying https but it was solved by adding this on the .htaccess (thanks to CSS not working - #5 by Abdel)
SetEnv no-gzip 1
However, to remove index.php tried many solutions but I could not get it solved!
when I modify
restful_urls = On
the CSS fails to load in both HTTP and HTTPS.
below are the solutions which I tried, although the index.php disappear but I got this error in the subpage
Not Found The requested URL was not found on this server.
I have two problem acctually
problem with css for both http and https (when setting the restful_urls = On)
problem with mydomain.com/subpage (when I click on the page it directs me to its link - without index.php - but says File not found.)
By the way your the configuration you mentioned works well when I install OJS locally using Apache and mysql
But I don’t know what is the problem with ovh cloud!
I found a solution for this (but I assume it is not ideal!):
Instead of setting
restful_urls = On (which creates errors in css loading)
I set
disable_path_info = On
this makes the url having something like ?=
then I add these to the .htaccess
SetEnv no-gzip 1 # This is not related to the url but to load the css in https!
RewriteEngine On
RewriteCond %{QUERY_STRING} ^journal=([^&]+)$
RewriteRule ^$ /%1? [R=301,L]
RewriteCond %{QUERY_STRING} ^journal=([^&]*)&page=([^&]*)$
RewriteRule ^$ /%1/%2? [R=301,L]
RewriteCond %{QUERY_STRING} ^journal=([^&]*)&page=([^&]*)&op=([^&]*)$
RewriteRule ^$ /%1/%2/%3? [R=301,L]
RewriteRule ^([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)$ /index.php?journal=$1&page=$2&op=$3 [L,QSA]
RewriteRule ^([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)$ /index.php?journal=$1&page=$2 [L,QSA]
RewriteRule ^([a-zA-Z0-9_-]+)$ /index.php?journal=$1 [L,QSA]