Skip to content

Commit

Permalink
enabled mod_rewrite; added .htaccess
Browse files Browse the repository at this point in the history
  • Loading branch information
schmunk42 committed Jan 24, 2018
1 parent a473bb6 commit 1c5261a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
FROM yiisoftware/yii2-php:7.2-apache

RUN a2enmod rewrite

WORKDIR /app

ADD composer.lock composer.json /app/
Expand Down
6 changes: 6 additions & 0 deletions web/.htaccess
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
RewriteEngine on
# If a directory or a file exists, use it directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# Otherwise forward it to index.php
RewriteRule . index.php

0 comments on commit 1c5261a

Please sign in to comment.