Answer the question
In order to leave comments, you need to log in
Internal links in PHP like ?page= do not work, how to fix?
Good day.
I work with the source code of the site.
Links from the view menu ?page=pagename
When you change the name of the page and the link itself, it is not displayed.
the content is embedded in index.php and should be displayed in the middle after the link is clicked.
How to solve this problem?
Answer the question
In order to leave comments, you need to log in
Splitting content with a GET parameter is a bad practice and can also be bad for the site's SEO, try to organize your code so that different pages of the site have different files and URLs.
In your case, you most likely mean a one-page site and want to scroll the page to a certain place by clicking in the menu, and for this task, the use of parameters is not necessary, as it will cause an unwanted page reload with a new GET parameter when clicked.
For correct behavior in this case, use anchor links with a hashtag, i.e. , and assign the corresponding block to the block it leads to :<a href="#block1">Ссылка к блоку 1</a>
id
<div id="block1">Контент блока</div>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question