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 attribute is used in <img> tag for the address of the image?
href src rel
<img src="http://coursesweb.net/imgs/webcourses.gif" width="191" height="63" alt="Courses-Web" />
Which CSS code hides the element on page?
display: none; display: inline; position: relative;
#id {
  display: none;
}
What instruction stops the execution of a while() or for() statement?
continue prompt() break
for(var i = 0; i< 8; i++) {
  if(i > 1) break;
  alert(i);
}
Indicate the function that can create a constant.
define() include() defined()
define("CONSTANT_NAME", "value");
echo CONSTANT_NAME;
htaccess - Redirect URL address from HTTP and WWW to HTTPS

Last accessed pages

  1. Egg shape with CSS (3138)
  2. Convert BBCode to HTML and HTML to BBCode with JavaScript (9093)
  3. XML sitemap with data from MySQL (3545)
  4. Display multiple groups of images (5298)
  5. Merge Multiple Files, Line by Line (1009)

Popular pages this month

  1. Courses Web: PHP-MySQL JavaScript Node.js Ajax HTML CSS (443)
  2. SHA1 Encrypt data in JavaScript (236)
  3. Read Excel file data in PHP - PhpExcelReader (217)
  4. PHP Unzipper - Extract Zip, Rar Archives (217)
  5. Get and Modify content of an Iframe (139)