• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
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
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


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.