Forum Moderators: coopster

Message Too Old, No Replies

Redirecting home page to a specific php page

         

Ian_W

5:14 pm on May 19, 2003 (gmt 0)

10+ Year Member



Hi,

I am struggling to get the index.php page to display automatically as index.php?section=1,5,7,9 rather than just index.php

I have tried a

redirect permanent / [domain.com...]

- but this never goes anywhere :(

Any thoughts as to how I can acomplish this?

Thanks.

Birdman

5:26 pm on May 19, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Try this in your .htaccess file:

DirectoryIndex index.phpsection?section=1,5,7,9

Ian_W

5:52 pm on May 19, 2003 (gmt 0)

10+ Year Member



I tried that at one point, but it didn't work - however have just put it into the httpd.conf, and we seem to be there - so thank you :)

isorg

5:28 am on May 21, 2003 (gmt 0)

10+ Year Member



Try putting this at the top of the index.php file:


<?
if (!$section) {header("Location: /index.php?section=1,5,7,9"); exit;}
echo ("You'll only see this if you have the right section! i.e. $section");
?>

Ian_W

8:03 am on May 21, 2003 (gmt 0)

10+ Year Member



isorg - thanks I think you have inadvertantly solved another query for me. .... goes away to try this for another idea :)