Answer the question
In order to leave comments, you need to log in
Style connection error due to Router?
There was a problem, styles on other pages are not connected.
1. The structure of my project.
project
==app
=views
=layouts
=default.php (Standard template: header and footer, styles are connected in the header .)
=Main
=index.php ( Content is displayed here )
=public
=css
=js
=index.php( This is the point login to the application, requests all go here)
=.htaccess ( htaccess number 2 )
.htaccess ( htaccess number 1 )
.htaccess number 1
File in the root of the site: project/.htaccess
AddDefaultCharset utf-8
RewriteEngine On
RewriteRule ^(.*)$ public/$1
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?$1 [L,QSA]
<!DOCTYPE html>
<html lang="en">
<head>
<title>Title of the website</title>
<meta charset="utf-8">
<link rel="stylesheet" href="css/bootstrap.min.css">
</head>
Answer the question
In order to leave comments, you need to log in
If you format the directory structure inserted with crooked hands,
=app
=views
=layouts
=default.php ( Стандартный шаблон: хэдэр и футер, в хэдере подключаются <b>стили</b>.)
=Main
=index.php ( Здесь выводится контент )
=public
=css
=js
=index.php( Это точка входа в приложение, запросы все сюда идут )
=.htaccess ( <b>htaccess number 2</b> )
.htaccess ( <b>htaccess number 1</b> )
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question