Php-mysql Course

To redirect the URL addresses of your domain from HTTP to HTTPS, add the following code at beginning in the .htaccess file.
- It is a 301 redirect, good for SEO.
Options +FollowSymLinks
RewriteEngine On

RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

Make URL address without www

If you also want to make all the URL addresses of your website without www, add the following code in .htaccess.
- Replace "domain_name" with the name of your domain.
RewriteCond %{HTTP_HOST} ^www.domain_name.net
RewriteRule ^(.*)$ https\:\/\/domain_name.net\/$1 [R=301,L]
- Make sure that the links in the pages of your website are with the New Address.

Daily Test with Code Example

HTML
CSS
JavaScript
PHP-MySQL
Which tag is used in <table> to create table header cell?
<thead> <th> <td>
<table><tr>
  <th>Title 1</th>
  <th>Title 2</th>
</tr></table>
Which CSS property sets the distance between lines?
line-height word-spacing margin
.some_class {
  line-height: 150%;
}
Which function opens a new browser window.
alert() confirm() open()
document.getElementById("id_button").onclick = function(){
  window.open("http://coursesweb.net/");
}
Indicate the PHP function that returns an array with names of the files and folders inside a directory.
mkdir() scandir() readdir()
$ar_dir = scandir("dir_name");
var_export($ar_dir);
htaccess - Redirect URL address from HTTP and WWW to HTTPS

Last accessed pages

  1. querySelector and querySelectorAll (30136)
  2. Courses Web: PHP-MySQL JavaScript Node.js Ajax HTML CSS (142540)
  3. JavaScript strip_tags and stripslashes (8825)
  4. Date and Time in ActionScript 3 (10086)
  5. Bind Tool and Control Points (4430)

Popular pages this month

  1. Courses Web: PHP-MySQL JavaScript Node.js Ajax HTML CSS (543)
  2. The Mastery of Love (65)
  3. CSS cursor property - Custom Cursors (63)
  4. Read Excel file data in PHP - PhpExcelReader (59)
  5. PHP-MySQL free course, online tutorials PHP MySQL code (44)