I used PhpWiki to create my tutorials in the past, but I decided that it was restricting me from doing certain things and had too much overhead for my simple tutorials. I decided that I would just hard code the tutorials in PHP, but I knew that in doing so, the traffic from my site from search engines would pull up 404 errors. I really didn't want that to happen and I know that some search engines take forever to reindex a site.
A wiki will usually only use one page, but will dynamically load data into that page to make it look different. Most wiki URLs will look similar to www.domain.com/tutorial/index.php/My Page. The wiki is actually using just one page, index.php. This actually makes it very easy on us, because then we only have to create one page called index.php, and redirect the My Page part of the request to the new static PHP page, such as www.domain.com/tutorial/mypage.php.
We need to send a code to the search engines to tell it that the old URL that they have is no longer valid and to replace it with the new one. You have to send this in the HTML Header, which is sent by the web server. To do this, you have to put a PHP script at the very top of your new page, without comments, whitespace, or anything else before it:
<?php //please note that this should be the very first thing on the page
As you can see in the preceding code, you have to catch each page that you want to redirect. Be careful with special characters such as parenthesis, as you will have to catch the actual parenthesis and their URL code. I am unsure of why you have to do this, but that's just what I have experienced. The default case is what the user will get if they just went to www.domain.com/tutorial/index.php.