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 adds a new line into a paragraph?
<b> <br> <p>
First line ...<br>
Other line...
Which CSS property can be used to add space between letters?
text-size word-spacing letter-spacing
#id {
  letter-spacing: 2px;
}
What JavaScript function can be used to get access to HTML element with a specified ID?
getElementById() getElementsByTagName() createElement()
var elm = document.getElementById("theID");
var content = elm.innerHTML;
alert(content);
Click on the "echo" correct instruction.
echo "CoursesWeb.net" echo "CoursesWeb.net"; echo ""CoursesWeb.net";
echo "Address URL: http://CoursesWeb.net";
htaccess - Redirect URL address from HTTP and WWW to HTTPS

Last accessed pages

  1. Styling link buttons using a Single Image and CSS (2203)
  2. Area and Perimeter Calculator for 2D shapes (8713)
  3. Countdown Timer with starting time added into a form (8957)
  4. Get Mime Type of file or string content in PHP (3129)
  5. Wake Up! (10070)

Popular pages this month

  1. Courses Web: PHP-MySQL JavaScript Node.js Ajax HTML CSS (509)
  2. PHP Unzipper - Extract Zip, Rar Archives (491)
  3. querySelector and querySelectorAll (386)
  4. SHA256 Encrypt hash in JavaScript (380)
  5. Create simple Website with PHP (352)