My redirect/routing via .htaccess not working

### Demoapps/templater

URL: http://demoapps.rf.gd/templater/

Error Message

This page isn’t working

demoapps.rf.gd is currently unable to handle this request.

HTTP ERROR 500

Other Information

In my live server, I have demoapps.rf.gd//htdocs/templater/ the templater file contains the project So I have a .htaccess in that folder:

RewriteEngine On
RewriteBase /templater/

RewriteCond %{DOCUMENT_ROOT}/assets/$1 -f
RewriteRule ^(.*)$ assets/$1 [L]

RewriteCond %{DOCUMENT_ROOT}/node_modules/$1 -f
RewriteRule ^(.*)$ node_modules/$1 [L]

RewriteCond %{THE_REQUEST} \s/assets/ [NC,OR]
RewriteCond %{THE_REQUEST} \s/node_modules/ [NC,OR]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L,QSA]

This is usually caused by a PHP code crash, not a .htaccess error. With .htaccess errors, you’re usually redirected to a separate error page.

But it should be easy to verify though. Does the HTTP ERROR 500 if you remove/rename the .htaccess file so the rules are not applied?

5 Likes

Oh thanks. I enabled the PHP error showing and it showing that there are some PHP errors since my code in v8 while free tier is in v7

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.