I have been using the server commands below in my .htaccess file for months without any problems, but yesterday, out-of-the-blue, whenever I attempted to navigate from the website homepage to other pages, or attempted to navigate through the Magento Admin settings pages, I got a mostly blank screen with the words "No input file specified" on it. I looked into the browser console and it listed the error as "Failed to load resource: the server responded with a status of 404 ()".
After some research, I determined that it was caused by the redirect commands in the public_html/.htaccess file.
I added the redirect at the urging of Magento, in order to not have sensitive Magento files available for the "public" to see/or use. (I am not using GoDaddy hosting or servers in any way). I got the redirect commands from a BlueHost or DreamHost webpage.
I have tried adding "?" and removing "/" from some of the commands, but it only shows a new error.
I also commented out the redirect commands allows me to navigate all throughout the website and the Magento Admin settings pages.
Can anyone point me in the right directions for what commands I need to use to have the redirects work properly, and a guide(s) as to what .htaccess commands do?
Thank you very much.
RewriteBase /public_html/pub
# Rewrites all URLs without pub in them
RewriteCond %{REQUEST_URI} !^/pub/
# Rewrites all URLs
RewriteCond %{HTTP_HOST} ^(www\.)?abc\.
# Rewrite all those to insert /folder
RewriteRule ^(.*)$ /pub/$1 [L]