FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
nodebeginner.org/header.php at master · scapefish/nodebeginner.org · GitHub
scapefish
/
nodebeginner.org
Public
forked from
manuelkiessling/nodebeginner.org
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
nodebeginner.org
/
header.php
Copy path
More file actions
More file actions
Latest commit
History
History
History
48 lines (37 loc) · 1021 Bytes
Breadcrumbs
nodebeginner.org
/
header.php
Copy path
File metadata and controls
48 lines (37 loc) · 1021 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<?php
ob_start
();
$
httpHost
=
$
_SERVER
[
'
HTTP_HOST
'
];
$
requestUri
=
$
_SERVER
[
'
REQUEST_URI
'
];
$
queryString
=
$
_SERVER
[
'
QUERY_STRING
'
];
if
(
substr
(
$
requestUri
,
0
,
11
) ===
'
/index.html
'
) {
$
location
=
'
http://
'
.
$
httpHost
.
'
/
'
;
if
(
$
queryString
!==
''
) {
$
location
.=
'
?
'
.
$
queryString
;
}
header
(
'
HTTP/1.1 301 Moved Permanently
'
);
header
(
'
Location:
'
.
$
location
);
die
();
}
$
pathinfo
=
pathinfo
(
$
_ENV
[
'
SCRIPT_FILENAME
'
]);
$
extension
=
$
pathinfo
[
'
extension
'
];
if
(
$
extension
!=
'
html
'
) {
header
(
'
Cache-Control: max-age=604800
'
);
// 1 week
}
if
(
$
extension
==
'
html
'
) {
header
(
'
Content-type: text/html; charset=utf-8
'
);
}
if
(
$
extension
==
'
css
'
) {
header
(
'
Content-type: text/css; charset=utf-8
'
);
}
if
(
$
extension
==
'
js
'
) {
header
(
'
Content-type: text/javascript; charset=utf-8
'
);
}
if
(
$
extension
==
'
png
'
) {
header
(
'
Content-type: image/png
'
);
}
if
(
$
extension
==
'
jpg
'
) {
header
(
'
Content-type: image/jpeg
'
);
}
if
(
$
extension
==
'
gif
'
) {
header
(
'
Content-type: image/gif
'
);
}
Back
|
FazBrowse Home
|
New Git URL