Ajout du mod rewrite pour prendre en compte toutes les requêtes.
This commit is contained in:
parent
4df4c1f023
commit
0724dcda24
@ -26,6 +26,9 @@ COPY vhost.conf /etc/apache2/sites-available/000-default.conf
|
|||||||
RUN docker-php-ext-configure gd --with-freetype --with-jpeg \
|
RUN docker-php-ext-configure gd --with-freetype --with-jpeg \
|
||||||
&& docker-php-ext-install pdo pdo_mysql mbstring exif pcntl bcmath gd zip curl intl
|
&& docker-php-ext-install pdo pdo_mysql mbstring exif pcntl bcmath gd zip curl intl
|
||||||
|
|
||||||
|
# Enable Apache mods
|
||||||
|
RUN a2enmod rewrite
|
||||||
|
|
||||||
# Clean cache
|
# Clean cache
|
||||||
RUN apt-get -y autoremove \
|
RUN apt-get -y autoremove \
|
||||||
&& apt-get clean \
|
&& apt-get clean \
|
||||||
@ -33,4 +36,3 @@ RUN apt-get -y autoremove \
|
|||||||
|
|
||||||
# Copy source code
|
# Copy source code
|
||||||
COPY . /var/www
|
COPY . /var/www
|
||||||
|
|
||||||
|
|||||||
21
public/.htaccess
Normal file
21
public/.htaccess
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
<IfModule mod_rewrite.c>
|
||||||
|
<IfModule mod_negotiation.c>
|
||||||
|
Options -MultiViews -Indexes
|
||||||
|
</IfModule>
|
||||||
|
|
||||||
|
RewriteEngine On
|
||||||
|
|
||||||
|
# Handle Authorization Header
|
||||||
|
RewriteCond %{HTTP:Authorization} .
|
||||||
|
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
|
||||||
|
|
||||||
|
# Redirect Trailing Slashes If Not A Folder...
|
||||||
|
RewriteCond %{REQUEST_FILENAME} !-d
|
||||||
|
RewriteCond %{REQUEST_URI} (.+)/$
|
||||||
|
RewriteRule ^ %1 [L,R=301]
|
||||||
|
|
||||||
|
# Send Requests To Front Controller...
|
||||||
|
RewriteCond %{REQUEST_FILENAME} !-d
|
||||||
|
RewriteCond %{REQUEST_FILENAME} !-f
|
||||||
|
RewriteRule ^ index.php [L]
|
||||||
|
</IfModule>
|
||||||
@ -1,3 +1,3 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
echo "Hello :)";
|
echo "Hello from " . $_SERVER['SERVER_ADDR'];
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user