
include_once(getcwd().'/path/from/root/to/file.php');
You need to tell Google and the other search bots to not index the pages for your test site. You can do that with your robot.txt or you can do it directly in the header code of the test site. Just remember to remove it when the site is live.GOOGLE has commenced indexing the site at the /www/ testlocation!
Is this bad news? If I am going to be shifting this across to its home directory soon? Will it effect my SEO if Google finds the pages deleted or re-directed?
When the site does go live you don't want the search engines to point to your test site.<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
That will tell Google to look at your root site for the new pages with a 301 redirect.RewriteRule ^www/(.*)$ $1 [L,R=301]
require_once($_SERVER['DOCUMENT_ROOT'] .'/header.php');
require_once($_SERVER['DOCUMENT_ROOT'] .'/path/to/header.php');
include_once($_SERVER['DOCUMENT_ROOT'] .'/path/to/header.php');

include_once($_SERVER['DOCUMENT_ROOT'] .'/header.php');

<link href="/css/style.css" rel="stylesheet" type="text/css" />
<link href="<? include($_SERVER['DOCUMENT_ROOT']); ?>/css/style.css" rel="stylesheet" type="text/css" />
Hi all,
I have created a php site and have 2 basic questions about PHP. The test location of the site is here: http://www.tyretraders.com.au/www/index.php
1. I currently have pages which 'pulls' the header and footer:
<?php require_once('header.php'); ?> and <?php require_once('footer.php'); ?>
The header and footer are located in the ROOT folder along with all other pages. However, I would like to have some pages in different folders for the site as its getting quite large.
This is a problem because I cannot seem to get the 'require once' script to point to the specific php script, i.e. - <?php require_once('../header.php'); ?> or <?php require_once('http://www.tyretraders.com.au/header.php'); ?> and it really messes up the site.
2. In the past when I have created a php site I have had to create two index files (www.careerexpo.com.au):
1. index.html
2. index.php
The user lands on index.html and then it refreshes to index.php. Is there an easier way to have the user land directly on the index.php page?
Thanks in advance for any help on the above questions.
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Top 21 PHP Programming mistakes | thexchord | PHP | 18 | Today 09:52 AM |
| Basic Question | Curtster | PHP | 5 | February 11 '08 08:12 PM |
| Question on basic layout | Snuggles | Web Design Discussion | 2 | July 29 '07 04:41 PM |
| PHP - QUESTION. | 3DeSiGnZ | PHP | 3 | July 5 '03 01:02 PM |
| Basic PHP Uploads Tutorial | thexchord | Coding Articles & Tutorials | 2 | May 2 '02 09:28 PM |