# Block access to "hidden" directories whose names begin with a period. This
# includes directories used by version control systems such as Subversion or Git.
	<IfModule mod_rewrite.c>
	  RewriteCond %{SCRIPT_FILENAME} -d
	  RewriteCond %{SCRIPT_FILENAME} -f
	  RewriteRule "(^|/)\." - [F]

	</IfModule>
# BEGIN GZIP
	<ifmodule mod_deflate.c>
	AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css application/x-javascript application/javascript
	</ifmodule>
# END GZIP


# USUAL STUFF
#	DirectoryIndex index.php
	Options +FollowSymlinks
	RewriteEngine On
	RewriteBase /

# ROUTINGS
        
        # LOCALHOST
        
                RewriteCond %{HTTP_HOST} ^localhost [NC]
                RewriteCond %{REQUEST_URI} ^/uilcasa.ro/assets/$ [NC]
                RewriteRule ^(.*)$ /uilcasa.ro/ [R=301,L]
                
                RewriteCond %{HTTP_HOST} ^localhost [NC]
                RewriteCond $1 !^(index\.php|cms\.php|assets|pictures|captcha|news|feed|agents|banners|sitemap\.xml\.gz|robots\.txt|phpThumb|dbench|CI)
                RewriteRule ^(.*)$ /uilcasa.ro/index.php/$1 [L]

        # LIVE
        
        
                RewriteCond %{HTTP_HOST} ^uilcasa.ro [NC]
                RewriteRule ^(.*)$ http://dev.sicomedia.ro/$1 [R=301,L] 

                RewriteCond %{REQUEST_URI} ^/assets/$ [NC]
                RewriteRule ^(.*)$ http://dev.sicomedia.ro/ [R=301,L]

                RewriteCond $1 !^(index\.php|cms\.php|assets|pictures|news|captcha|feed|agents|banners|user_images|sitemap\.xml\.gz|robots\.txt|phpThumb|dbench|CI)
                RewriteRule ^(.*)$ index.php?/$1 [L]

 

<IfModule !mod_rewrite.c>
    ErrorDocument 404 /index.php
</IfModule>