Diff
Not logged in

Differences From:

File src/main.c part of check-in [c7c81df138] - Add the "Index Page" setup option to allow each site to configure a page to appear when no URL is specified or when the "Home" menu option is selected. by drh on 2008-05-16 13:31:51. [view]

To:

File src/main.c part of check-in [68c24b1857] - Progress toward getting ticket handling to work. by drh on 2008-05-16 18:11:39. [view]

@@ -454,8 +454,15 @@
   }
 }
 
 /*
+** Send an HTTP redirect back to the designated Index Page.
+*/
+void fossil_redirect_home(void){
+  cgi_redirectf("%s%s", g.zBaseURL, db_get("index-page", "/index"));
+}
+
+/*
 ** Preconditions:
 **
 **    * Environment variables are set up according to the CGI standard.
 **    * The respository database has been located and opened.
@@ -475,9 +482,9 @@
   set_base_url();
   zPathInfo = P("PATH_INFO");
   if( zPathInfo==0 || zPathInfo[0]==0
       || (zPathInfo[0]=='/' && zPathInfo[1]==0) ){
-    cgi_redirectf("%s%s", g.zBaseURL, db_get("index-page", "/index"));
+    fossil_redirect_home();
   }else{
     zPath = mprintf("%s", zPathInfo);
   }