How to show index.html as default page .htaccess

DirectoryIndex index.html default.html index.php

Add above line in .htaccess file to make index.html directory default page. Apache read DirectoryIndex form left to right and serve the file which it find first. So if you have index.html in your directory it will serve index.html as default page.

Angular 4 Get current route

import { Component } from '@angular/core';
import { Router, NavigationEnd } from '@angular/router';


export class MyComponent {

  constructor(private router:Router) { => {

      if (event instanceof NavigationEnd ) {
        console.log("current url",event.url); // event.url has current url
        // your code will goes here

Follow Redirects with cURL

Is there a way to follow redirects with command line cURL?

$ curl -L

You need to add the -L or --location option to enable curl to follow HTTP redirects.

Curl 302 redirect not working (command line)
use option -L or --location

$ curl -L <url> 

Make PHP curl to follow redirects

curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);