Hi
I am using OJS 3.3.0.14 and I wrote this code in the htaccass file:
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php/$1 [QSA,L]
I have many journals on my website and I wrote this code to remove index.php from the URL.
The problem is that this code is always lost after some time. I saved the changes in the htaccess file and everything is working well, but after some days, this code is disappearing from the file and the URLs of my journals are not working. I rewrote the code again more than once but it is lost every time. Also, I have changed the permission of the htaccess file to read-only but the problem still exists.
Is there any setting in the OJS causing removing the code from the htaccess file?! , and how can I prevent the code from disappearing?
Not aware that OJS changes .htaccess . You should check with your system administrator.
2 Likes
You can try moving the code to your Apache vhost file if you have access to it, or check with your hosting company, OJS doesn’t create files like this by default.
Best regards,
Josh
1 Like
Thanks for your reply.
I have changed the hosting and the problem continues !
Best regards
Have you tried to add the code to your journal Apache vhost file?
Best regards,
Josh
The problem was in the Cpanel code in the htaccess file.
It removes any code following it.
1 Like