Sunday 27 December 2015

Clean url and relative path

Use base tag in header section of your html

<base href="http://localhost/flight/">
Then use teh path from base to the required file
example:

<link rel="stylesheet" href="./theme/default/assets/animate.css/animate.min.css" type="text/css">



Example
<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <base href="http://localhost/flight/">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <meta name="description" content="Login Form">
  <title>Login Form</title>
  <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:700,400&amp;subset=cyrillic,latin,greek,vietnamese">
  <link rel="stylesheet" href="./theme/default/assets/bootstrap/css/bootstrap.min.css" type="text/css">
  </head>