MOD_REWRITE REQUIRED

Dominique Riche Posted in Technical Support 4 weeks ago

Hello,
I have problem to install OSSN. the .htacces file is indeed in rewrite mode and I still have the same installation problem: MOD_REWRITE REQUIRED.
The .htaccess file looks like:


# Open Source Social Network
#
# @package .htaccess.ossn
# @author OSSN Core Team <[email protected]>
# @copyright (c) Engr. Syed Arsalan Hussain Shah (OpenTeknik LLC)
# @license OPEN SOURCE SOCIAL NETWORK LICENSE https://opensource-socialnetwork.org/licence
# @link https://www.opensource-socialnetwork.org

Options -Indexes
Options +SymlinksIfOwnerMatch
DirectoryIndex index.php

<Files "error_log">
order allow,deny
deny from all
</Files>

<Files ".user.ini">
order allow,deny
deny from all
</Files>

<FilesMatch "(nginx|htaccess).dist">
order allow,deny
deny from all
</FilesMatch>

Disallow CLI and CRON script from browser

RedirectMatch 404 ^/system/handlers/cli$
RedirectMatch 404 ^/system/handlers/cron$

<IfModule mod_mime.c>
AddType image/vnd.microsoft.icon .ico
</IfModule>

<IfModule mod_expires.c>
ExpiresActive On
ExpiresDefault "access plus 1 year"
</IfModule>

<FilesMatch "\.(jpg|jpeg|gif|png|mp3|flv|mov|avi|3pg|html|htm|swf|js|css|ico)$">
FileETag MTime Size
</FilesMatch>

<IfModule mod_rewrite.c>

SetEnv HTTPMODREWRITE 1

RewriteEngine on
RewriteRule ^rewrite.php$ installation/tests/apache_rewrite.php [L]

RewriteRule ^action\/([A-Za-z0-9\\-\/]+)$ system/handlers/actions.php?action=$1&%{QUERYSTRING} [L]

RewriteCond %{REQUESTFILENAME} !-d
RewriteCond %{REQUEST
FILENAME} !-f
RewriteRule ^([A-Za-z0-9\_\-]+)$ index.php?h=$1 [QSA,L]

RewriteCond %{REQUESTFILENAME} !-d
RewriteCond %{REQUEST
FILENAME} !-f
RewriteRule ^([A-Za-z0-9\_\-]+)\/(.*)$ index.php?h=$1&p=$2 [QSA,L]

</IfModule>

https://github.com/nextcloud/server/issues/26569

<IfModule modphp.c>
php
value memorylimit 512M
php
value registerglobals 0
php
value postmaxsize 105M
phpvalue uploadmaxfilesize 100M
php
value defaultcharset "UTF-8"
php
flag session.cookie_httponly on
</IfModule>


Thank you for your help

Replies
Indonesian Arsalan Shah Replied 3 weeks ago

Any status on this please?

French Dominique Riche Replied 4 weeks ago

Thank you for your reply.
I get a 500 error back.
My site is in https

Indonesian Arsalan Shah Replied 4 weeks ago

@Dominique there are so many existing discussions here already about this, if you own a server make sure HTTPS is switched on for your website and see what do you see when you visit yourwebsite.com/rewrite.php ? if you see nothing or 404 that means mod_rewrite is not enabled or configured for your virtual host.