Create WEB SHOP using PHP (MySQL, MVC, Twig) *e-commerce website*

Описание к видео Create WEB SHOP using PHP (MySQL, MVC, Twig) *e-commerce website*

IF YOU ARE USING APACHE WEB SERVER, put in .htaccess file:


Remove the question mark from the request but maintain the query string
RewriteEngine On

Uncomment the following line if your public folder isn't the web server's root
RewriteBase /

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^(.*)$ index.php?$1 [L,QSA]







IF YOU ARE USING NGINX WEB SERVER





nginx configuration to remove the question mark from the URL but maintain the query string

location / {
if (!-f $request_filename){
set $rule_0 1$rule_0;
}
if (!-d $request_filename){
set $rule_0 2$rule_0;
}
if ($rule_0 = "21"){
rewrite ^/(.*)$ /index.php?$1 last;
}
}

Комментарии

Информация по комментариям в разработке