Shared hosting is an easy way to deploy PHP code especially if you are new to technology. To run PHP on your own server you need to be able to build, configure and maintain a server. You may make a mistake with a firewall configuration, and your code will not run. Paying $5 a month for a shared hosting plan allows you to focus on learning PHP.
Related Articles
![](https://www.elithecomputerguy.com/wp-content/uploads/2018/12/if-else-326x245.jpg)
PHP Programming (NEW)
PHP – if else Statements
If Else Statements allow for code to run if a condition is true, but have different code run of a condition is false. <?php $age = 15; print “Your Age is $age”; print “<br>”; […]
![](https://www.elithecomputerguy.com/wp-content/uploads/2018/11/php-print-326x245.jpg)
PHP Programming (NEW)
PHP – Print Function and New Line Command in…
The Print Function in PHP allows you to print text to dynamically create a web page. It’s important to understand that what you see in a web browser is different then what you would see […]
![](https://www.elithecomputerguy.com/wp-content/uploads/2019/12/mySQL-PHP-to-INSERT-Into-Table-326x245.jpg)
MySQL Introduction (NEW)
MySQL – PHP to INSERT Into Table
You can use PHP to INSERT data into MySQL Tables. This data can come from HTML forms, or things such as scripts that parse text documents. phpInsert.php
1 Comment
Leave a Reply Cancel reply
You must be logged in to post a comment.
I signed up for shared hosting through hostgator. I had to modify the .htaccess file so that it would recognize my SSL certificate; everything works so long as I type out https://mywebsite.com instead of mywebsite.com. How do I rewrite this file so that I automatically redirect all http requests to https instead? Thanks!
.htaccess file on hostgator:
# Use PHP71
AddHandler application/x-httpd-php71 .php
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^(.*)$ https://mywebsite.com/$1 [R=301,L]