I recently began supporting a new site that uses virtual pages - or more appropriately - php scripts in the directory structure. When trying to convert the site to another server these pages/scripts do not work. example http://www.myserver.com/animals/mammals/dog A mammals file exists at http://www.myserver.com/animals/ with the following code: <?php
The url would actually be .../mammals/72 which would display the Dog Category.
The script continues after to retrieve the data from the Database and display the webpage. However, I can only get it to work when I have .../mammals.php/72 in the url instead of just .../mammals/72
After further research, this is just an alternate method of processing Search Engine friendly URL's(url aliasing). You are correct on Document_Root as well. Thanks
If you're asking for technical help, please be sure to include all your system info, including operating system, model number, and any other specifics related to the problem. Also please exercise your best judgment when posting in the forums--revealing personal information such as your e-mail address, telephone number, and address is not recommended.
Virtual Pages / Scripts as Directories
example
http://www.myserver.com/animals/mammals/dog
A mammals file exists at http://www.myserver.com/animals/
with the following code:
<?php
require_once($_SERVER['DOCUMENT_ROOT'] . '/_includes/config.php');
list($a, $cat_id) = explode("/", $_SERVER['PATH_INFO']);
if($cat_id=='' || !is_numeric($cat_id)){
echo "Invalid or no parameter supplied";
exit();
}
if(!Biology::validCategoryID($cat_id)){
echo "Invalid category supplied";
exit();
}
Does a redirect or dns alias need to be setup for the mammals file to work properly? Is this an "approved" method of displaying virtual pages?