I have a navigational links in a php page
nav.php, Which is included in all pages of my website. I have got folder structure like below
+top_folder -config.php +includes_folder -nav.php (conatins links to all pages in my website) +courses_folder -course1.php -course2.php -nav.php
<?php $main_url = "http://www.myapp.com/"; ?>
<ul> <li><a href="<?=$main_url?>courses_folder/course1.php">Course 1</li> <li><a href="<?=$main_url?>courses_folder/course2.php">Course 2</li> </ul>
So, I am including the
top_folder/includes_folder/nav.php file in all pages. But I also placed
nav.php in other location:
top_folder/courses_folder/nav.php and I am not including this file in any file of my website.
$main_url is only defined in
config.php, which I am including in all files, Not in
nav.php. So the
$main_url is being displayed as blank in crawled page i.e.
Google has crawled
top_folder/courses_folder/nav.php page also. The links are not proper bacause $main_url is null in this case.
So It's been a 7 months since i done this changes.
Is it a good idea to just include the
Do i need to create the files and folders (As links in
Do i need to disallow the links (
Among the above, Which is the recommended solution to solve the 404 issues without affecting the SEO.