There could be many reasons for a web server to not be able to send correct response codes including 301 Moved Permanently. It could be wrong PHP coding, database collation or character encoding, web server not following Symbolic Links amongst others.
That is why, I can’t tell most of you how you can fix all of them here, but rather, first inform you about the most common cause, that is, if you attempt to turn RewriteEngine On a web server without the mod_rewrite module installed and enabled, this will cause 500 Internal Server Error. To resolve this issue, use mod_rewrite module for 301 in .htaccess file like this:
What if you tried that and still getting 500 Internal Server Errors? Then, include Options +FollowSymLinks settings to fix the 301 Moved Permanently Error problem
RewriteEngine On
#If you turn the engine on by itself without checking if mod_rewrite module is enabled on your server, this commonly causes 500 internal errors, because it is NOT wrapped within a module. That means, simply make sure that it looks like this instead:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^oldURL/ httpshttps://www.example.com/newURL/ [R=301,NC,L]
</IfModule><IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine On
RewriteRule ^oldURL/ httpshttps://www.example.com/newURL/ [R=301,NC,L]
</IfModule>
This Helped me to understand the platform really well. I finally got the solution to it now!