Welcome Guest, Not a member yet? Register   Sign In
500 Internal Server Error on Web Server for subpages
#1

I've just uploaded my site to Ionos, but every page that isn't the home page (e.g. www.mywebsite.com/page) gives a 500 Internal Server Error.

I am using the ddefault .htaccess that came with CodeIgniter 4.

If I go to www.mywebsite.com/index.php/page, the page loads fine.

Has anybody else had this issue, or could help? I've been stuck for hours  Sad
Reply
#2

(This post was last modified: 04-23-2020, 01:54 PM by jreklund.)

Try to edit your /public/.htaccess and add a question mark. Some servers don't do rewrite without it.

Code:
RewriteRule ^(.*)$ index.php?/$1 [L]

or

Code:
RewriteRule ^(.*)$ index.php?/$1 [L,QSA]
Reply
#3

(04-23-2020, 01:51 PM)jreklund Wrote: Try to edit your /public/.htaccess and add a question mark. Some servers don't do rewrite without it.

Code:
RewriteRule ^(.*)$ index.php?/$1 [L]

or

Code:
RewriteRule ^(.*)$ index.php?/$1 [L,QSA]


Thank you jreklund!!! By itself, adding the question mark didn't work, but I tried enabling the RewriteBase / line and hey presto! IT WORKED!
Thanks a million.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB