-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path.htaccess
39 lines (29 loc) · 1.24 KB
/
.htaccess
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
#php_flag magic_quotes_gpc off
# exclude unauthorized HTTP verbs
<LimitExcept POST GET HEAD OPTIONS>
Deny from all
</LimitExcept>
# BEGIN Syntax Desktop
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
# redirecting non-www to www
RewriteCond %{HTTP_HOST} !^www\.
RewriteCond %{HTTP_HOST} !\.kleis\.biz$
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
# add trailing slash
RewriteCond %{REQUEST_URI} !(/$|\.)
RewriteRule (.*) %{REQUEST_URI}/ [R=301,L]
# /pagina/area~x/linea~y/prodotto~z.html
# RewriteRule ^([a-z0-9-_/]+)/([A-Za-z0-9-_]+)~(\d+)/(?:([A-Za-z0-9-_]+)~(\d+)/)??(?:([A-Za-z0-9-_\.]+)~(\d+)\.html)??$ $1/?area=$2&idarea=$3&linea=$4&idlinea=$5&prodotto=$6&id=$7 [QSA]
# /pagina/categoria~x/corso~y.html
RewriteRule ^([a-z0-9-_/]+)/(?:([A-Za-z0-9-_]+)~(\d+)/)??(?:([A-Za-z0-9-_\.]+)~(\d+)\.html)??$ $1/?categoria=$2&idcategoria=$3&title=$4&id=$5 [QSA]
# /pagina/notizia~n.html
RewriteRule ^(.*)/([A-Za-z0-9-_]+)~(\d+)\.html$ $1/?title=$2&id=$3 [QSA]
# /pagina/index10.html
RewriteRule ^(.*)/index([0-9]+)\.html$ $1/?_next_page=$2&parent=$1 [QSA]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END Syntax Desktop