Skip to content

Commit 024b65f

Browse files
committed
site updated
1 parent 6aad64b commit 024b65f

52 files changed

Lines changed: 3899 additions & 937 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.htaccess

Lines changed: 80 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -1,69 +1,89 @@
1-
# ============================================================
2-
# School of Freelancing — .htaccess (cPanel / Apache)
3-
# ============================================================
1+
############################################
2+
# School Of Freelancing
3+
############################################
4+
Options -Indexes
5+
DirectoryIndex index.html
6+
RewriteEngine On
47

5-
# ---- PHP Error Handling ----
6-
php_flag display_errors Off
7-
php_value error_reporting 0
8+
##################################################
9+
# Localhost only (no HTTPS/WWW force)
10+
##################################################
11+
RewriteCond %{HTTP_HOST} ^(localhost|127\.0\.0\.1)$ [NC]
12+
RewriteRule ^ - [L]
813

9-
# ---- Enable Compression ----
10-
<IfModule mod_deflate.c>
11-
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css
12-
AddOutputFilterByType DEFLATE application/javascript application/json
13-
AddOutputFilterByType DEFLATE application/xml application/xhtml+xml
14-
</IfModule>
14+
##################################################
15+
# Redirect /index.html to /
16+
##################################################
17+
RewriteRule ^index\.html$ / [R=301,L]
1518

16-
# ---- Browser Caching ----
17-
<IfModule mod_expires.c>
18-
ExpiresActive On
19-
ExpiresByType text/html "access plus 1 hour"
20-
ExpiresByType text/css "access plus 1 month"
21-
ExpiresByType application/javascript "access plus 1 month"
22-
ExpiresByType image/jpeg "access plus 6 months"
23-
ExpiresByType image/png "access plus 6 months"
24-
ExpiresByType image/gif "access plus 6 months"
25-
ExpiresByType image/svg+xml "access plus 6 months"
26-
ExpiresByType image/webp "access plus 6 months"
27-
ExpiresByType font/woff2 "access plus 1 year"
28-
</IfModule>
19+
##################################################
20+
# Redirect directory index.html to /
21+
##################################################
22+
RewriteRule ^(.+)/index\.html$ /$1/ [R=301,L]
2923

30-
# ---- Security Headers ----
31-
<IfModule mod_headers.c>
32-
Header always set X-Frame-Options "SAMEORIGIN"
33-
Header always set X-Content-Type-Options "nosniff"
34-
Header always set X-XSS-Protection "1; mode=block"
35-
Header always set Referrer-Policy "strict-origin-when-cross-origin"
36-
Header always set Permissions-Policy "geolocation=(), microphone=(), camera=()"
37-
</IfModule>
24+
##################################################
25+
# Redirect old flat HTML pages to clean folders
26+
##################################################
27+
RewriteRule ^training\.html$ /training/ [R=301,L]
28+
RewriteRule ^enrollment\.html$ /training/enroll/ [R=301,L]
29+
RewriteRule ^tech-support\.html$ /tech-support/ [R=301,L]
30+
RewriteRule ^support\.html$ /tech-support/ [R=301,L]
31+
RewriteRule ^get-support\.html$ /tech-support/get-support/ [R=301,L]
32+
RewriteRule ^get_support\.html$ /tech-support/get-support/ [R=301,L]
33+
RewriteRule ^testimonials\.html$ /testimonials/ [R=301,L]
34+
RewriteRule ^about\.html$ /about/ [R=301,L]
35+
RewriteRule ^faq\.html$ /faq/ [R=301,L]
36+
RewriteRule ^privacy-policy\.html$ /privacy-policy/ [R=301,L]
37+
RewriteRule ^terms\.html$ /terms/ [R=301,L]
38+
RewriteRule ^contact\.html$ /contact/ [R=301,L]
3839

39-
# ---- Force HTTPS ----
40-
<IfModule mod_rewrite.c>
41-
RewriteEngine On
42-
RewriteCond %{HTTPS} off
43-
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
44-
</IfModule>
40+
##################################################
41+
# Internally load index.html for clean folder URLs
42+
##################################################
43+
RewriteCond %{REQUEST_FILENAME} !-f
44+
RewriteCond %{REQUEST_FILENAME} !-d
45+
RewriteCond %{DOCUMENT_ROOT}/$1/index.html -f
46+
RewriteRule ^(.+?)/?$ $1/index.html [L]
4547

46-
# ---- Remove www (optional — comment out to keep www) ----
47-
# <IfModule mod_rewrite.c>
48-
# RewriteEngine On
49-
# RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
50-
# RewriteRule ^ https://%1%{REQUEST_URI} [R=301,L]
51-
# </IfModule>
52-
53-
# ---- Custom Error Pages ----
54-
ErrorDocument 404 /404.html
55-
ErrorDocument 500 /500.html
48+
##################################################
49+
# Browser Cache
50+
##################################################
51+
<IfModule mod_expires.c>
52+
ExpiresActive On
53+
ExpiresByType text/html "access plus 0 seconds"
54+
ExpiresByType text/css "access plus 30 days"
55+
ExpiresByType application/javascript "access plus 30 days"
56+
ExpiresByType image/jpeg "access plus 1 year"
57+
ExpiresByType image/png "access plus 1 year"
58+
ExpiresByType image/gif "access plus 1 year"
59+
ExpiresByType image/webp "access plus 1 year"
60+
ExpiresByType image/svg+xml "access plus 1 year"
61+
ExpiresByType image/x-icon "access plus 1 year"
62+
ExpiresByType font/woff "access plus 1 year"
63+
ExpiresByType font/woff2 "access plus 1 year"
64+
ExpiresByType application/font-woff2 "access plus 1 year"
65+
</IfModule>
5666

57-
# ---- Protect sensitive files ----
58-
<FilesMatch "(\.htaccess|\.htpasswd|\.env|composer\.json|package\.json)$">
59-
Order Allow,Deny
60-
Deny from all
61-
</FilesMatch>
67+
##################################################
68+
# GZIP Compression
69+
##################################################
70+
<IfModule mod_deflate.c>
71+
AddOutputFilterByType DEFLATE text/plain
72+
AddOutputFilterByType DEFLATE text/html
73+
AddOutputFilterByType DEFLATE text/xml
74+
AddOutputFilterByType DEFLATE text/css
75+
AddOutputFilterByType DEFLATE application/javascript
76+
AddOutputFilterByType DEFLATE application/json
77+
AddOutputFilterByType DEFLATE application/xml
78+
AddOutputFilterByType DEFLATE image/svg+xml
79+
</IfModule>
6280

63-
# ---- MIME Types ----
64-
<IfModule mod_mime.c>
65-
AddType application/javascript .js
66-
AddType text/css .css
67-
AddType image/svg+xml .svg
68-
AddType font/woff2 .woff2
81+
##################################################
82+
# Security Headers
83+
##################################################
84+
<IfModule mod_headers.c>
85+
Header always set X-Frame-Options SAMEORIGIN
86+
Header always set X-Content-Type-Options nosniff
87+
Header always set Referrer-Policy strict-origin-when-cross-origin
88+
Header always set Permissions-Policy "camera=(), microphone=(), geolocation=()"
6989
</IfModule>

.htaccessbackup

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
# ============================================================
2+
# School of Freelancing — .htaccess (cPanel / Apache)
3+
# ============================================================
4+
5+
# ---- PHP Error Handling ----
6+
php_flag display_errors Off
7+
php_value error_reporting 0
8+
9+
# ---- Enable Compression ----
10+
<IfModule mod_deflate.c>
11+
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css
12+
AddOutputFilterByType DEFLATE application/javascript application/json
13+
AddOutputFilterByType DEFLATE application/xml application/xhtml+xml
14+
</IfModule>
15+
16+
# ---- Browser Caching ----
17+
<IfModule mod_expires.c>
18+
ExpiresActive On
19+
ExpiresByType text/html "access plus 1 hour"
20+
ExpiresByType text/css "access plus 1 month"
21+
ExpiresByType application/javascript "access plus 1 month"
22+
ExpiresByType image/jpeg "access plus 6 months"
23+
ExpiresByType image/png "access plus 6 months"
24+
ExpiresByType image/gif "access plus 6 months"
25+
ExpiresByType image/svg+xml "access plus 6 months"
26+
ExpiresByType image/webp "access plus 6 months"
27+
ExpiresByType font/woff2 "access plus 1 year"
28+
</IfModule>
29+
30+
# ---- Security Headers ----
31+
<IfModule mod_headers.c>
32+
Header always set X-Frame-Options "SAMEORIGIN"
33+
Header always set X-Content-Type-Options "nosniff"
34+
Header always set X-XSS-Protection "1; mode=block"
35+
Header always set Referrer-Policy "strict-origin-when-cross-origin"
36+
Header always set Permissions-Policy "geolocation=(), microphone=(), camera=()"
37+
</IfModule>
38+
39+
# ---- Force HTTPS ----
40+
<IfModule mod_rewrite.c>
41+
RewriteEngine On
42+
RewriteCond %{HTTPS} off
43+
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
44+
</IfModule>
45+
46+
# ---- Remove www (optional — comment out to keep www) ----
47+
# <IfModule mod_rewrite.c>
48+
# RewriteEngine On
49+
# RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
50+
# RewriteRule ^ https://%1%{REQUEST_URI} [R=301,L]
51+
# </IfModule>
52+
53+
# ---- Custom Error Pages ----
54+
ErrorDocument 404 /404.html
55+
ErrorDocument 500 /500.html
56+
57+
# ---- Protect sensitive files ----
58+
<FilesMatch "(\.htaccess|\.htpasswd|\.env|composer\.json|package\.json)$">
59+
Order Allow,Deny
60+
Deny from all
61+
</FilesMatch>
62+
63+
# ---- MIME Types ----
64+
<IfModule mod_mime.c>
65+
AddType application/javascript .js
66+
AddType text/css .css
67+
AddType image/svg+xml .svg
68+
AddType font/woff2 .woff2
69+
</IfModule>

.htaccessbackup2

Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
############################################
2+
# School Of Freelancing
3+
# https://schooloffreelancing.com
4+
############################################
5+
6+
Options -Indexes
7+
8+
DirectoryIndex index.html
9+
10+
RewriteEngine On
11+
12+
##################################################
13+
# Force HTTPS
14+
##################################################
15+
16+
# RewriteCond %{HTTP_HOST} !^(localhost|127\.0\.0\.1)$ [NC]
17+
# RewriteCond %{HTTPS} !=on
18+
# RewriteRule ^ https://schooloffreelancing.com%{REQUEST_URI} [R=301,L]
19+
20+
##################################################
21+
# Force Non-WWW
22+
##################################################
23+
24+
# RewriteCond %{HTTP_HOST} ^www\.schooloffreelancing\.com$ [NC]
25+
# RewriteRule ^ https://schooloffreelancing.com%{REQUEST_URI} [R=301,L]
26+
RewriteCond %{HTTP_HOST} ^(localhost|127\.0\.0\.1)$ [NC]
27+
RewriteRule ^ - [L]
28+
29+
##################################################
30+
# Redirect /index.html to /
31+
##################################################
32+
33+
RewriteRule ^index\.html$ / [R=301,L]
34+
35+
##################################################
36+
# Redirect directory index.html
37+
#
38+
# /training/index.html
39+
# -> /training/
40+
##################################################
41+
42+
RewriteRule ^(.+)/index\.html$ /$1/ [R=301,L]
43+
44+
##################################################
45+
# Redirect old HTML pages
46+
##################################################
47+
48+
RewriteRule ^training\.html$ /training/ [R=301,L]
49+
RewriteRule ^tech-support\.html$ /tech-support/ [R=301,L]
50+
RewriteRule ^testimonials\.html$ /testimonials/ [R=301,L]
51+
RewriteRule ^about\.html$ /about/ [R=301,L]
52+
RewriteRule ^faq\.html$ /faq/ [R=301,L]
53+
RewriteRule ^privacy-policy\.html$ /privacy-policy/ [R=301,L]
54+
RewriteRule ^terms\.html$ /terms/ [R=301,L]
55+
RewriteRule ^contact\.html$ /contact/ [R=301,L]
56+
RewriteRule ^enrollment\.html$ /training/enroll/ [R=301,L]
57+
58+
##################################################
59+
# Internally load index.html
60+
##################################################
61+
62+
RewriteCond %{REQUEST_FILENAME} !-f
63+
RewriteCond %{REQUEST_FILENAME} !-d
64+
RewriteCond %{DOCUMENT_ROOT}/$1/index.html -f
65+
RewriteRule ^(.+?)/?$ $1/index.html [L]
66+
67+
##################################################
68+
# Browser Cache
69+
##################################################
70+
71+
<IfModule mod_expires.c>
72+
73+
ExpiresActive On
74+
75+
ExpiresByType text/html "access plus 0 seconds"
76+
77+
ExpiresByType text/css "access plus 30 days"
78+
79+
ExpiresByType application/javascript "access plus 30 days"
80+
81+
ExpiresByType image/jpeg "access plus 1 year"
82+
ExpiresByType image/png "access plus 1 year"
83+
ExpiresByType image/gif "access plus 1 year"
84+
ExpiresByType image/webp "access plus 1 year"
85+
ExpiresByType image/svg+xml "access plus 1 year"
86+
ExpiresByType image/x-icon "access plus 1 year"
87+
88+
ExpiresByType font/woff "access plus 1 year"
89+
ExpiresByType font/woff2 "access plus 1 year"
90+
ExpiresByType application/font-woff2 "access plus 1 year"
91+
92+
</IfModule>
93+
94+
##################################################
95+
# GZIP Compression
96+
##################################################
97+
98+
<IfModule mod_deflate.c>
99+
100+
AddOutputFilterByType DEFLATE text/plain
101+
AddOutputFilterByType DEFLATE text/html
102+
AddOutputFilterByType DEFLATE text/xml
103+
AddOutputFilterByType DEFLATE text/css
104+
AddOutputFilterByType DEFLATE application/javascript
105+
AddOutputFilterByType DEFLATE application/json
106+
AddOutputFilterByType DEFLATE application/xml
107+
AddOutputFilterByType DEFLATE image/svg+xml
108+
109+
</IfModule>
110+
111+
##################################################
112+
# Security Headers
113+
##################################################
114+
115+
<IfModule mod_headers.c>
116+
117+
Header always set X-Frame-Options SAMEORIGIN
118+
Header always set X-Content-Type-Options nosniff
119+
Header always set Referrer-Policy strict-origin-when-cross-origin
120+
Header always set Permissions-Policy "camera=(), microphone=(), geolocation=()"
121+
122+
</IfModule>

0 commit comments

Comments
 (0)