Skip to content

Commit

Permalink
More reliable .htaccess header directive
Browse files Browse the repository at this point in the history
  • Loading branch information
Finesse committed Aug 15, 2017
1 parent 9e0f7aa commit d27c1cd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 4 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,13 @@ chmod 777 logs
Make the directory `public` be the document root of the web server.
Or just open [http://localhost/public](http://localhost/public) if you installed the repository to the web server root.

##### 3.1 Not Apache server

Do it if your web server is not Apache.

Make all the requests to not-existing files be handled by `public/index.php`.
Make all the requests to not-existing files be handled by `public/index.php`.
If your server is Apache, it's already done.

Make the server add the `Access-Control-Allow-Origin: *` HTTP-header to the font files.
Otherwise some browsers will reject using fonts from the repository.
Use can do it using [this instruction](https://davidwalsh.name/cdn-fonts).
If you use Apache make sure that the `mod_header.c` mod is on (to turn it on run the `a2enmod headers` command and restart the server).
For nginx use [this instruction](https://davidwalsh.name/cdn-fonts).

### Setup

Expand Down
4 changes: 3 additions & 1 deletion public/.htaccess
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,7 @@ RewriteRule ^ index.php [QSA,L]

# Some browsers require the special header
<FilesMatch "\.(woff|woff2|ttf|eot|svg)$">
Header set Access-Control-Allow-Origin "*"
<IfModule mod_headers.c>
Header set Access-Control-Allow-Origin "*"
</IfModule>
</FilesMatch>

0 comments on commit d27c1cd

Please # to comment.