I have a page called: "right_side.php"
which includes the following:
Code: Select all
<?php
switch($_GET['page']) {
case "name-of-the-page" :
echo 'Echos out the content placed here
';
break;
>php
htaccess file
Code: Select all
SetEnv DEFAULT_PHP_VERSION 5
Options +FollowSymLinks
RewriteEngine on
# 301 Redirect all requests that don't contain a dot or trailing slash to
# include a trailing slash
# except for form POSTS
RewriteCond %{REQUEST_URI} !/$
RewriteCond %{REQUEST_URI} !\.
RewriteCond %{REQUEST_METHOD} !POST$
RewriteRule ^(.*) %{REQUEST_URI}/ [R=301,L]
# Rewrites urls in the form of /parent/child/
# but only rewrites if the requested URL is not a file or directory
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?page=$1 [QSA]
The SWITCH/CASE works when mod_rewrite is disabled, but need to enable it with friendly URL's....
Thanks in advance.
Lee