/
.htaccess
40 lines (30 loc) · 1.15 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
40
RewriteOptions inherit
<IfModule mod_rewrite.c>
# ciHTACCESS, by Mario "Kuroir" Ricalde
RewriteEngine On
RewriteBase /ln
# Redirect index.php and default controller (you need to edit this) to "/". This is to prevent duplicated
# Content. ( /welcome/index , index.php => /)
RewriteRule ^(welcome(/index)?|index(\.php)?)/?$ / [L,R=301]
# Remove /index/ segment on the URL.
RewriteRule ^(.*)/index/? $1 [L,R=301]
# Remove Trailing Slashes.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)(/+)$ $1 [L,R=301]
# Remove Multiple slashes in betweeen
RewriteCond %{REQUEST_URI} ^(.*)//(.*)$
RewriteRule . %1/%2 [R=301,L]
# Add the file SUFIX (sufix can be set on config.php).
# RewriteCond %{REQUEST_FILENAME} !-f
# RewriteCond %{REQUEST_FILENAME} !-d
# RewriteCond %{REQUEST_URI} !\.html
# RewriteRule ^(.+)$ $1\.html [L,R=301]
# Remove any slash before .html ( to prevent site/.html )
# RewriteCond %{REQUEST_URI} \/+\.html$ [NC]
# RewriteRule ^(.+)\/+\.html$ $1\.html [L,R=301]
# Send everything to index.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>