Projekt

Obecné

Profil

632 michalklim
RewriteEngine On
665 jsvitak
RewriteBase /
632 michalklim
702 jsvitak
# Protect application and system files from being viewed.
RewriteCond $1 ^(application|system)
632 michalklim
# Rewrite to index.php/access_denied/URL
702 jsvitak
RewriteRule ^(.*)$ access_denied/$1 [PT,L]
632 michalklim
702 jsvitak
# URL containing these strings will not be rewrited.
665 jsvitak
RewriteCond $1 ^(index\.php|robots\.txt|favicon\.ico|media|static)
632 michalklim
RewriteRule ^(.*)$ - [PT,L]

# Force EVERY URL to contain a language in its first segment.
# Redirect URLs without a language to the invalid xx language.
RewriteCond $2 !^([a-z]{2}(/|$)) [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(index\.php/?)?(.*)$ en/$2 [R=301,L]

# Silently prepend index.php to EVERY URL.
RewriteCond $1 !^(index\.php)
665 jsvitak
RewriteRule ^(.*)$ index.php/$1 [L]