.htaccess redirection

Published 6 months ago by omarsow94

I just hosted my site on OVH, but I have the error 500. do you think it's because of the .htaccess file .htaccess content

<IfModule mod_rewrite.c>
    <IfModule mod_negotiation.c>
        Options -MultiViews
    </IfModule>

    RewriteEngine On

    RewriteCond %{REQUEST_FILENAME} !-d
    #RewriteRule ^(.*)/$ / [L,R=301] // i have replaced the '/' and it worked.
    RewriteRule ^(.*)/$  [L,R=301]

    # Handle Front Controller...
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^ index.php [L]
</IfModule>
Snapey
Snapey
6 months ago (926,095 XP)

very unlikely

.htaccess is more likely to cause 404 errors

500 errors are most likely permission errors

omarsow94

So in fileZilla 705 permission for forders and 604 for files .

Snapey
Snapey
6 months ago (926,095 XP)

755 permission for storage folder and children

omarsow94

Yes it's done but i have this error message:

Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at [email protected] to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.
Snapey
Snapey
6 months ago (926,095 XP)

Your php version is correct?

Has a Laravel.log file been created?

omarsow94

My php version is PHP 7.0.22,

Laravel.log where ? in my laravel app home ?

Snapey
Snapey
6 months ago (926,095 XP)

Logs are created in /storage/logs

omarsow94

Yes i have laravel.log in Storage/logs

omarsow94

and one of errors is :

[2017-12-20 22:31:59] local.ERROR: Not enough arguments (missing: "name"). {"exception":"[object] (Symfony\Component\Console\Exception\RuntimeException(code: 0): Not enough arguments (missing: \"name\"). at /var/www/html/thiam/akhmedou/vendor/symfony/console/Input/Input.php:76)
Snapey
Snapey
6 months ago (926,095 XP)

ok so now you are into debugging issues with your application rather than hosting issues

omarsow94

i don't have errors in local

s4muel

just a note: malformed .htaccess might definitely result in error 500.

but even if i don't like the first RewriteRule without the Substitution part (second 'parameter' ), this doesn't look like that case;)

Please sign in or create an account to participate in this conversation.