Page 1 of 1

Hard code page

Posted: Sun Aug 06, 2006 7:32 am
by daik
I am very much a newbie when it comes to php, so this may seem like a very silly question.
Anyway.. what I want to do is to make sure that if a visitor enters my site via a directory they always endup at a specific page.
say the user enters mysite.com/uploads/ into the browser then I want the cms to load the page 'uploads' as if the user entered mysite.com/index.php?page=uploads

I tried this by putting a php file in the uploads dir and it looked like this:

Code: Select all

<?php
$page='uploads';
include('../index.php');
?>
but it does not work. What happens is that the page loads as it should, only it loads the default page, not the uploads one. BUT if I enter mysite.com/uploads/index.php?page=Uploads all works as it is supposed to. What am I doing wrong?
How can I make the cms always load this specific page from this directory?

regards
Daniel

Re: Hard code page

Posted: Sun Aug 06, 2006 8:03 am
by tsw


Should do the trick

Re: Hard code page

Posted: Sun Aug 06, 2006 8:19 am
by daik
Yes, it works like a charm, thank you!