equal
deleted
inserted
replaced
105 $this->template_cache = Array(); |
105 $this->template_cache = Array(); |
106 } |
106 } |
107 function parse_url($sanitize = true) |
107 function parse_url($sanitize = true) |
108 { |
108 { |
109 $title = ''; |
109 $title = ''; |
110 if( isset($_GET['title']) ) |
110 if ( isset($_GET['title']) ) |
111 { |
111 { |
112 $title = $_GET['title']; |
112 $title = $_GET['title']; |
113 } |
113 } |
114 elseif( isset($_SERVER['PATH_INFO']) ) |
114 else if ( isset($_SERVER['PATH_INFO']) ) |
115 { |
115 { |
116 $title = substr($_SERVER['PATH_INFO'], ( strpos($_SERVER['PATH_INFO'], '/') ) + 1 ); |
116 // fix for apache + CGI (occurred on a GoDaddy server, thanks mm3) |
|
117 if ( @substr(@$_SERVER['GATEWAY_INTERFACE'], 0, 3) === 'CGI' && $_SERVER['PATH_INFO'] == scriptPath . '/index.php' ) |
|
118 { |
|
119 // do nothing; ignore PATH_INFO |
|
120 } |
|
121 else |
|
122 { |
|
123 $title = substr($_SERVER['PATH_INFO'], ( strpos($_SERVER['PATH_INFO'], '/') ) + 1 ); |
|
124 } |
117 } |
125 } |
118 else |
126 else |
119 { |
127 { |
120 // This method really isn't supported because apache has a habit of passing dots as underscores, thus corrupting the request |
128 // This method really isn't supported because apache has a habit of passing dots as underscores, thus corrupting the request |
121 // If you really want to try it, the URI format is yoursite.com/?/Page_title |
129 // If you really want to try it, the URI format is yoursite.com/?/Page_title |