Google Analytics provides a way to add a filename to any page path ending with a slash, in order to standardize data for pages that might be accessible with or without the filename. Look in Admin > View Settings for the Default Page field, right underneath time zone. An index.php in that field is your reason!
Redirect permanent /webpage https://example.com/webpage.txt
or if you are using a recent version of Apache, you can redirect to relative URLs:
Redirect permanent /webpage /webpage.txt
You can also implement this with mod_rewrite:
RewriteRule "^/?webpage$" "/webpage.txt" [R=301,L]
https://www.bybe.net/cloudflare-enforce-ssl-redirect-http-https/ has the full details.
To redirect to HTTPS, you need add a "Page Rule" for http://*example.com/* with the "Always Use HTTPS" option from the settings.
To redirect to www you need three "Page Rules":
http://example.com/* -> https://www.example.com/$1
https://example.com/* -> https://www....
I think you have two problems:
You don't say your bye.php should redirect. Right now you have it specified as a rewrite rather than a redirect. You need to add [L,R] flags to it to get it to redirect.
You don't need your slash rules at all anymore. Because you didn't specify "last" with the [L] flag, on your bye.php rule, the slash rules are also taking ...