Discussion: .htaccess
In the previous quiz, Online PHP Quiz, we tested our experience gained from the course.
3 messages from 3 displayed.
//= Settings::TRACKING_CODE_B ?> //= Settings::TRACKING_CODE ?>
In the previous quiz, Online PHP Quiz, we tested our experience gained from the course.
This is usually done by using 2 .htaccess files. One for your root folder:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^$ public/ [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^public/
RewriteRule ^(.*)$ public/$1
</IfModule>
And the second one for the public folder:
Options -Indexes
RewriteEngine On
# RewriteBase /
# front controller
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule !\.(pdf|js|ico|gif|jpg|png|css|rar|zip|tar\.gz)$ index.php [L]
AddType application/x-httpd-php .php .phtml
This should work.
3 messages from 3 displayed.