Menu

#29 Simple change to avoid redirect in index.php

closed-fixed
nobody
None
5
2014-08-16
2004-04-05
Luke Francl
No

I'm kind of a dork, but I don't like web redirects if they can be
avoided.

I made a simple change in index.php that eliminates the need for
the initial redirect and therefore keeps the URL short in the default
case. For exmaple, if your calendar is at http://host/cal/,
PHPiCalendar will send you to http://host/cal/day.php when you
view that page.

In index.php, if you change the line:

header("Location: $default_view");

to this:

include( $default_view );

You will not be redirected; instead PHP will dynamically include the
$default_view file and process it. The URL stays the same.

This also has a minor side benefit of reducing the number of server
requests required to send the page.

Discussion

1 2 3 .. 8 > >> (Page 1 of 8)
  • Chad Little

    Chad Little - 2004-05-13

    Logged In: YES
    user_id=585637

    Applied.

     
  • Chad Little

    Chad Little - 2004-05-13
    • status: open --> closed-fixed
     
1 2 3 .. 8 > >> (Page 1 of 8)
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.