Skip to content
This repository has been archived by the owner on Dec 13, 2020. It is now read-only.

Commit

Permalink
Docs for server configuration, added root .htaccess
Browse files Browse the repository at this point in the history
  • Loading branch information
cadavre committed Aug 26, 2016
1 parent 022c243 commit ea3ff5b
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .htaccess
@@ -0,0 +1,10 @@
<IfModule mod_rewrite.c>
RewriteEngine On
# If an existing asset or directory is requested go to it as it is
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -f [OR]
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -d
RewriteRule ^ - [L]

# If the requested resource doesn't exist, use index.html
RewriteRule ^ /index.html
</IfModule>
20 changes: 20 additions & 0 deletions docs/server-configuration.MD
@@ -0,0 +1,20 @@
# Server configuration

Angular2 application by default works with so called hashbangs. They made url look like `/#/window/111`. To change this to `/window/111` you need to use HTML5 browser history functionality and adjust your server configuration.

## Apache2

Server configuration for Apache2 can be found in project root in `.htaccess`.

## nginx

In your `server {}` block use:

```
root /var/www/root_project_dir;
index index.html;
location / {
try_files $uri /index.html;
}
```

0 comments on commit ea3ff5b

Please sign in to comment.