diff options
Made every request get redirected to index.php
3 files changed, 12 insertions, 3 deletions
| -rw-r--r-- | devrix-job-board.conf | 9 | ||||
| -rw-r--r-- | src/models/Company.php | 2 | ||||
| -rw-r--r-- | src/models/JobOffer.php | 4 |
diff --git a/devrix-job-board.conf b/devrix-job-board.conf index 12bee1c..49356f2 100644 --- a/devrix-job-board.conf +++ b/devrix-job-board.conf @@ -3,4 +3,13 @@ DocumentRoot /var/www/devrix-job-board ServerName djb.local ServerAlias djb.local + + <Directory /> + RewriteEngine On + RewriteBase / + RewriteCond %{REQUEST_FILENAME} !-d + RewriteCond %{REQUEST_FILENAME} !-f + RewriteRule ^(.+)$ index.php [QSA,L] + </Directory> </VirtualHost> + diff --git a/src/models/Company.php b/src/models/Company.php index 0df31ee..1dfb05e 100644 --- a/src/models/Company.php +++ b/src/models/Company.php @@ -1,5 +1,5 @@ <?php -include_once("DBModel.php"); +include_once("models/DBModel.php"); class Company extends DBModel { public string $name; diff --git a/src/models/JobOffer.php b/src/models/JobOffer.php index 7913edd..6f2aa29 100644 --- a/src/models/JobOffer.php +++ b/src/models/JobOffer.php @@ -1,6 +1,6 @@ <?php -include_once("DBModel.php"); -include_once("Company.php"); +include_once("models/DBModel.php"); +include_once("models/Company.php"); /** * Model that contains the required JobOffer properties. It also contains the request methods to the job_offers table. |
