Answer the question
In order to leave comments, you need to log in
How do you make a single point of entry on the site?
I'm trying to make a single entry point on the site, but it doesn't work, everything works crookedly. When a file is included in index.php, links to css and img are not correctly displayed on the loaded page, which for some reason change their address depending on the url. I don't understand what's wrong with me. Maybe someone will throw off the scripts for splitting the url into parts and following it from their projects. And a .htaccess file wouldn't hurt either. So that I know if I'm doing everything right. And how do others implement the entry point. There are almost no scripts on the Internet.
Answer the question
In order to leave comments, you need to log in
which for some reason change their address depending on the url. I don't understand what's wrong with me.
<link href="/design/css/main.css">
<img src="/design/images/logo.png">
<base>
<base href="http://my-super-site.ru/">
<link href="design/css/main.css">
<img src="design/images/logo.png">
You should start with the fundamentals - filesystem paths, the MVC pattern, and the front controller.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question