~strahinja/strahinja-org-slw

ref: simple strahinja-org-slw/.htaccess -rw-r--r-- 1.4 KiB
fc3a816dСтрахиња Радић New blog post 1 year, 1 month ago
                                                                                
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
<IfModule mod_rewrite.c>
    ErrorDocument 404 /404.html

    RewriteEngine On
    RewriteBase /

    Redirect 404 /.htaccess
    Redirect 410 /categories
    Redirect 410 /favorites
    Redirect 410 /logout
    Redirect 410 /omeni
    Redirect 410 /pomocy.php
    Redirect 410 /razno
    Redirect 410 /sitemap.xml
    Redirect 410 /veze
    RedirectMatch 410 /tekstovi/razno.*
    Redirect 410 /doku/cv-strahinja-radic.pdf
    
    #RewriteCond %{SERVER_PORT} 80
    
    #RewriteCond %{HTTPS} off
    #RewriteCond %{HTTP_HOST} ^(?!gemini.)
    #RewriteRule ^/?(.*)$ https://strahinja.org/$1 [R=301,L]

    Redirect /tekstovi/softver/gnu /tekstovi/softver

    RedirectMatch ^/tekstovi/matematika/?$ /tekstovi
    RedirectMatch ^/tekstovi/softver/?$ /tekstovi
    
    RewriteRule ^/?profil/?$ /profil/index.html [L]
    RewriteRule ^/?portfolio/?$ /portfolio/index.html [L]
    RewriteRule ^/?tekstovi/?$ /tekstovi/index.html [L]
    RewriteRule ^/?tekstovi/([a-z_-]+)/?$ /tekstovi/$1/index.html [L]
    RewriteRule ^/?tekstovi/([a-z_-]+)/([a-z_-]+)/?$ /tekstovi/$1/$2.html [L]

    RewriteCond %{REQUEST_FILENAME}.html -f
    RewriteRule ^/?blog/([^/]+)/([^/]+)/?$ /blog/$1/$2.html [L]

    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^/?blog/([0-9]{4})([0-9]{2})([0-9]{2})/?$ /blog/$1-$2/$1$2$3.html [L]

    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^/?blog/([^/]+)/?$ /blog/$1/index.html [L]

    RewriteRule ^/?blog/?$ /blog/index.html [L]
</IfModule>